Skip site navigation (1) Skip section navigation (2)

Re: Triggers with DO functionality

From: Thom Brown <thom(at)linux(dot)com>
To: Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Triggers with DO functionality
Date: 2012-02-23 08:26:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 23 February 2012 07:15, Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it> wrote:
> On Fri, Feb 17, 2012 at 11:43:53AM -0500, Andrew Dunstan wrote:
>> On 02/17/2012 11:29 AM, David E. Wheeler wrote:
>> >On Feb 17, 2012, at 5:22 AM, Thom Brown wrote:
>> >>The purpose being to only have a single statement to set up the
>> >>trigger rather than setting up a separate trigger function which will
>> >>unlikely be re-used by other triggers... or is this of dubious
>> >>benefit?
>> >+1, though I imagine it would just give it a generated name and save it anyway, eh?
>> Before we rush into this, let's consider all the wrinkles. For
>> example, what if you need to change the function? And how would you
>> edit the function in psql? It might be a bit more involved that it
>> seems at first glance, although my initial reaction was the same as
>> David's.
> Another complication: anonymous triggers would either have to be
> alone, or provide a mechanism to manage a sequence of anonymous
> triggers on the same table (such as "replace the third trigger with
> ..." or "move trigger #4 in position #2", or deciding their order of
> execution).

Isn't the order of execution alphabetical by trigger name in
PostgreSQL?  The Triggers themselves wouldn't be anonymous, we'd still
be naming them.  It's the referenced functions that would no longer
need defining, and even those probably won't technically be anonymous
as they'll need cataloguing somewhere.


In response to


pgsql-hackers by date

Next:From: Simon RiggsDate: 2012-02-23 08:34:18
Subject: Re: VACUUM ANALYZE is faster than ANALYZE?
Previous:From: Peter EisentrautDate: 2012-02-23 08:23:11
Subject: Re: Commit a445cb92 not tested without OpenSSL support?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group