Re: [SQL] ON DELETE CASCADE

2002-12-15 Thread Tim Perdue
Marie G. Tuite wrote: Here is a function that I use to list fk(triggers) on a table. Execute the function to get the trigger name and then - drop trigger "trigger_name" on table_name; Thanks for the function. Strangely enough, it appears the "extra" triggers are gone all by themselves. It seem

Re: [SQL] ON DELETE CASCADE

2002-12-12 Thread Dan Langille
On 12 Dec 2002 at 11:01, Tim Perdue wrote: > That command works, but now I think I have 2x as many triggers as I > want. How do I get rid of the original triggers? I had to do something similar and documented it at http://www.freebsddiary.org/postgresql-dropping-constraints.php hth -- Dan Lang

Re: [SQL] ON DELETE CASCADE

2002-12-12 Thread Marie G. Tuite
rrelid = c.oid; return rc; end; ' language 'plpgsql' ; > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Perdue > Sent: Thursday, December 12, 2002 11:01 AM > To: [EMAIL PROTECTED] > Subject: [SQL] ON DELETE CA

Re: [SQL] ON DELETE CASCADE

2002-12-12 Thread Stephan Szabo
On Thu, 12 Dec 2002, Tim Perdue wrote: > I'm trying to comb through my database and add ON DELETE CASCADE to a > number of tables where I already have fkeys in place, but I'm having a > hard time. > > ALTER TABLE project_task DROP CONSTRAINT > "project_task_group_project_id_f" RESTRICT; > > ERROR

[SQL] ON DELETE CASCADE

2002-12-12 Thread Tim Perdue
I'm trying to comb through my database and add ON DELETE CASCADE to a number of tables where I already have fkeys in place, but I'm having a hard time. ALTER TABLE project_task DROP CONSTRAINT "project_task_group_project_id_f" RESTRICT; ERROR: ALTER TABLE / DROP CONSTRAINT: project_task_group

Re: [SQL] ON DELETE CASCADE question

2002-06-14 Thread Jan Wieck
Josh Berkus wrote: > > Wei, > > > Does ON DELETE CASCADE attribute you specify in CREATE TABLE > > statement > > actually create triggers for every foreign key it refers to? > > > > Yes. Two triggers for each key, I think. Three, one for INSERT OR UPDATE on the FK table, one for UPDAT

Re: [SQL] ON DELETE CASCADE question

2002-06-14 Thread Josh Berkus
Wei, > Does ON DELETE CASCADE attribute you specify in CREATE TABLE > statement > actually create triggers for every foreign key it refers to? > Yes. Two triggers for each key, I think. -Josh ---(end of broadcast)--- TIP 4: Don't 'kill -9' the p

[SQL] ON DELETE CASCADE question

2002-06-14 Thread Wei Weng
Does ON DELETE CASCADE attribute you specify in CREATE TABLE statement actually create triggers for every foreign key it refers to? Thanks! -- Wei Weng Network Software Engineer KenCast Inc. ---(end of broadcast)--- TIP 5: Have you checked our