Thread: Triggers

Triggers

From
"Enrico Comini"
Date:
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

Re: Triggers

From
Stephan Szabo
Date:
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 ...