[SQL] 7.1 LOCK TABLE changes

2001-06-05 Thread Brian Powell
Greetings, I am investigating whether our application will run on 7.1.1 (from 7.0.3), and our client software only accesses the database through views for security and convenience. In our client app, we lock our table before doing something to it. Fortunately, in 7.0.3, a view looked like a

Re: [SQL] 7.1.1 Lock Problems on Views

2001-05-31 Thread Brian Powell
On Thursday, May 31, 2001, at 10:42 AM, Tom Lane wrote: > Why don't you redesign the app to not use table-level locks? > An MVCC-aware app should have little or no need for table-level > locking. > Thanks, I'll read up on MVCC in the docs. While digging around, I came across the MVCC and it w

[SQL] 7.1.1 Lock Problems on Views

2001-05-31 Thread Brian Powell
Greetings, I am investigating whether our application will run on 7.1.1 (from 7.0.3), and our client software only accesses the database through views for security and convenience. In our client app, we lock our table before doing something to it. Fortunately, in 7.0.3, a view looked like a

[SQL] I get an error with Foreign Keys

2000-11-30 Thread Brian Powell
I have around 40 tables defined, many relying on data in others so I have foreign key constraints. However, whenever I try to delete from any table, I get: ERROR: SPI_execp() failed in RI_FKey_cascade_del() What generates this? I need assistance in knowing where to begin. I checked again, an

Re: [SQL] Permissions Broken in 7.0.x?

2000-11-21 Thread Brian Powell
). The problem is that it fails because of the constraint! Any way around this? Or, am I sort of stuck granting all of these privileges to the table so that triggers, constraints, etc. will work? Thanks, Brian > Brian Powell <[EMAIL PROTECTED]> writes: >> % psql bobdb >> psql

[SQL] Permissions Broken in 7.0.x?

2000-11-21 Thread Brian Powell
Greetings, I am having problem with table permissions and view permissions. Say I am user bob and I own a database, bobdb. Let us also assume a user, tester has been added to the db, via create user... % psql bobdb psql => create table test ( name char(32) not null, ageint

[SQL] Cascading a pseudo-delete?

2000-11-07 Thread Brian Powell
Greetings, for our database, we keep everything--deleting nothing; however, to the client side, it should appear deleted. We do this via a status_cd for each record. If the status_cd is for 'deleted' then that item is not shown to the client-side. Anyhow, my question is that we also use foreign

[SQL] Bug in to_char()

2000-07-12 Thread Brian Powell
'3-12-2000 12:00'::timestamp, 'Dy, HH12:MI PM'); to_char --- Sun, 12:00 AM (1 row) NO! This is 12:00 pm. 0:00 or 24:00 is 12:00 am. Any known work arounds or bug fixes planned? Thanks, Brian -- +-

[SQL] Backup of BLOBS

2000-07-03 Thread Brian Powell
Greetings, I have a database that will be quite large that must be backed up nightly. I would like to use pg_dump; however, the problem is that we store binary data as well. Is there a way to backup this up without having to write a program to do it? Thanks, Brian

[SQL] Help with inserts into Views

2000-06-08 Thread Brian Powell
Greetings, I am having difficulty creating a way to insert into a view which joins multiple tables (specifically a view which joins multiple records from a single table to a record in another table). Please see the enclosed simple example for how I am currently inserting (updating, etc.) on view

[SQL] creating rules on joined views

2000-06-01 Thread Brian Powell
D'oh sorry for the subscribe message to the list... Greetings, I am new to PostGreSQL and the advanced capabilities that it offers. I would like to create a joined view that allows inserts and updates on two different tables (but, joined twice). Suppose you have: create table user { name