Re: Triggers - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Triggers
Date
Msg-id Pine.BSF.4.10.10009220952430.66920-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Triggers  ("Enrico Comini" <algobit@algobit.com>)
List pgsql-general
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 ...


pgsql-general by date:

Previous
From: Adam Haberlach
Date:
Subject: Re: one more word about rules
Next
From: Mike
Date:
Subject: PSQL Books