Re: [GENERAL] Modifying FK constraints

2004-11-11 Thread Stephan Szabo
On Wed, 10 Nov 2004, Oleg Lebedev wrote: > > In order to find all FK declared on a table I query tg_trigger view. The > query lists all FKs declared on the table as well as all the ones > referencing the table. I noticed that FKs that are declared on the table > have pgtype equal to 21, and FKs re

Re: [GENERAL] Modifying FK constraints

2004-11-10 Thread Oleg Lebedev
' and t.tgtype=21 and src.relname='objective'; Thanks. Oleg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oleg Lebedev Sent: Wednesday, November 10, 2004 10:37 AM To: Richard Huxton Cc: [EMAIL PROTECTED] Subject: Re: [GENERAL] Modifying

Re: [GENERAL] Modifying FK constraints

2004-11-10 Thread Stephan Szabo
On Wed, 10 Nov 2004, Oleg Lebedev wrote: > Is it possible to modify a foreign key constraint and force it to > cascade on update? If there is no such SQL command, then is it possible > to update some system tables to accomplish this? > > The problem is that I have a bunch of tables with FK constra

Re: [GENERAL] Modifying FK constraints

2004-11-10 Thread Oleg Lebedev
rce an FK constraint to cascade updates? Thanks. Oleg -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 10:23 AM To: Oleg Lebedev Cc: [EMAIL PROTECTED] Subject: Re: [GENERAL] Modifying FK constraints Oleg Lebedev wrote: > Greetings.

Re: [GENERAL] Modifying FK constraints

2004-11-10 Thread Michael Fuhr
On Wed, Nov 10, 2004 at 10:00:02AM -0700, Oleg Lebedev wrote: > Is it possible to modify a foreign key constraint and force it to > cascade on update? If there is no such SQL command, then is it possible > to update some system tables to accomplish this? You can drop and add constraints with ALTE

Re: [GENERAL] Modifying FK constraints

2004-11-10 Thread Richard Huxton
Oleg Lebedev wrote: Greetings. Is it possible to modify a foreign key constraint and force it to cascade on update? If there is no such SQL command, then is it possible to update some system tables to accomplish this? BEGIN; ALTER TABLE t1 DROP CONSTRAINT ... ALTER TABLE t1 ADD CONSTRAINT ... COM

[GENERAL] Modifying FK constraints

2004-11-10 Thread Oleg Lebedev
Title: Message Greetings.   Is it possible to modify a foreign key constraint and force it to cascade on update? If there is no such SQL command, then is it possible to update some system tables to accomplish this?   The problem is that I have a bunch of tables with FK constraints and I need