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
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
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
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
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
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
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
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