Search Postgresql Archives

Re: Constraint Trigger's referenced_table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Broersma Jr <rabroersma@xxxxxxxxx> writes:
> --- On Sat, 12/22/07, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>> No, the purpose is to support foreign-key triggers.  FK constraints are
>> implemented via cooperating triggers on the two tables, and
>> each trigger has to be able to look at the other table.
 
> When you say "each trigger has to be able to look" do you mean that each trigger needs to be notified when other table has records that are inserted/updated/deleted?

No, each trigger fires for events in its own table.  It then has to go
look at the other table to see if the FK constraint holds (and,
depending on which trigger you are talking about, perhaps make it hold
by changing the other table).

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux