Re: Constraint Triggers request

From: "Donald Fraser" <postgres(at)kiwi-fraser(dot)net>
To: "[pgADMIN]" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Constraint Triggers request
Date: 2006-05-10 10:35:02
Message-ID: 001c01c6741d$655d8860$0264a8c0@demolish1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support


> Donald Fraser wrote:
> > Do you think in a later version you can show non-system constraint
> > triggers that have been created by the user via:
> > CREATE CONSTRAINT TRIGGER ?

Andreas Pflug wrote:
> Definitively not. Creating constraint triggers directly is horribly
> outdated (pre-7.3), and still available for backwards compatibility
> only. Use contrib/adddepend to fix your database.

I'm not talking about old versions of PostgreSQL that have been upgraded to
later versions.
Prior to version 8.x.x all AFTER trigger events were deferred until the end
of all statements for the current transaction.
As of version 8.x.x AFTER trigger events occur after each statement in the
transaction - basically they are not deferred any more.
Unfortunately, for some of us, having deferred AFTER trigger events was a
nice feature.
There are some things you simply cannot do unless the trigger event is
deferred! I shouldn't need to qualify that statement, but the fact that
referential integrity requires them points out one example of when its nice
to have deferred trigger events.
Moving forward I am trying to upgrade a 7.4.x system to 8.0.x and I cannot
upgrade it without converting a lot of trigger functions from standard AFTER
trigger events to constraint trigger events, simply because I need them to
be deferred until the end of the transaction.
So after converting these "normal" trigger functions to "constraint" trigger
functions they disappear from view in pgAdmin...
They are not system generated trigger functions, they are not missing any
dependencies, they are there in that form because I need them to be there
and I created them using a PostgreSQL command "CREATE CONSTRAINT TRIGGER..."
I know that the documentation says "...It is not intended for general use."
Personally I don't see what's wrong with deferred trigger events, they are
useful, PostgreSQL already supports them, there is no other way of creating
deferred events yet!

I guess I will have to modify pgAdmin myself to achieve this.

Regards
Donald Fraser

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message alexis83@mail.ru 2006-05-10 14:24:03 Possible bug.
Previous Message Andreas Pflug 2006-05-09 19:17:45 Re: Constraint Triggers request