Constraint Triggers

From: "Donald Fraser" <postgres(at)kiwi-fraser(dot)net>
To: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: Constraint Triggers
Date: 2006-05-08 08:04:35
Message-ID: 001201c67276$0bc62440$0264a8c0@demolish1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm looking for a way to create a trigger function that gets called once per transaction as an AFTER EVENT.
Because there is no option for creating such a trigger function I was looking at the "create constraint trigger" command.

My approach would be to check the current transaction id to ensure that I only execute the function once per transaction and if it was deferred it would happen at the end of the transaction which would simulate an AFTER EVENT.

Apart from the obvious backup and restore problems can anyone think of any undesired side effects if I used this command?

Thanks in advance,
Donald Fraser

Browse pgsql-admin by date

  From Date Subject
Next Message Francesco Dalla Ca' 2006-05-08 10:09:13 OIDs wraparaound: postgresql (different versions) behavior
Previous Message Ben K. 2006-05-07 06:19:06 Re: How to list all the privileges a user has?