Triggers

Started by Enrico Cominiover 25 years ago2 messagesgeneral
Jump to latest
#1Enrico Comini
algobit@algobit.com

Question
If have a table with a primary key and another table with outer key
referenced on the primary of the first table.
If I want list the active triggers how i have to do ?
If I delete de first table I have the message (drop table implicity drop
reference .......), Then I re-create the first table, my question is how to
re-create the trigger without drop and re-create the second table.
Thanks,
Enrico

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Enrico Comini (#1)
Re: Triggers

On Fri, 22 Sep 2000, Enrico Comini wrote:

Question
If have a table with a primary key and another table with outer key
referenced on the primary of the first table.
If I want list the active triggers how i have to do ?

select * from pg_trigger;

If I delete de first table I have the message (drop table implicity drop
reference .......), Then I re-create the first table, my question is how to
re-create the trigger without drop and re-create the second table.

Probably your best bet is to:
ALTER TABLE <second table> ADD CONSTRAINT <constraintname>
FOREIGN KEY (<cols>) REFERENCES ...