[SQL] unsubscribe

2004-02-10 Thread Mona
unsubscribe ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

[SQL] Elegant way to monitor for changes in a trigger and migrate record to history table

2004-02-10 Thread David B
Folks, Perhaps you can helphell I'm sure you can! I want to monitor for changes in a table and migrate the OLD. record to audit table. Is there an elegant or generic way to do this so I can use across multiple tables with little change. E.g. IF TG_OP = 'UPDATE' THEN INSERT INTO cust_hist

[SQL] Unique Constraint with foreign Key

2004-02-10 Thread mohan
Hi all i am using postgres and torque I have a column x in Table A of type varchar and NOT NULL. I want to impose a unique key constraint on that table and column y is the primary key. I have another Table B with column x. can i make this column x as a foreign key on column x in table A. or Can i h

Re: [SQL] Error in declaring %rowtype for recurrence

2004-02-10 Thread Kumar
I am sorry. I didn't get you. Can u pls tell me more Thanks kumar - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: "Kumar" <[EMAIL PROTECTED]> Cc: "psql" <[EMAIL PROTECTED]> Sent: Tuesday, February 10, 2004 2:02 PM Subject: Re: [SQL] Error in declaring %rowtype for recurrenc

Re: [SQL] Error in declaring %rowtype for recurrence

2004-02-10 Thread Tom Lane
"Kumar" <[EMAIL PROTECTED]> writes: > WARNING: plpgsql: ERROR during compile of fn_rowtypetest near line 0 > ERROR: cache lookup for type 0 of recurrences.pg.dropped.16...= > . failed PG 7.4 is a little better at dealing with dropped columns in plpgsql rowtypes.

Re: [SQL] Bug or Feature?

2004-02-10 Thread Tom Lane
"Herbert R. Ambos" <[EMAIL PROTECTED]> writes: > [ drops only column of a table ] > Is this allowed in SQL? The SQL spec forbids that. We deliberately decided to ignore the spec restriction, because it creates too many unpleasant boundary cases for tools that want to manipulate table definitions