Re: Triggers with DO functionality - Mailing list pgsql-hackers

From Thom Brown
Subject Re: Triggers with DO functionality
Date
Msg-id CAA-aLv69nw37WL=UdbYNsjR5Hz0z8D04uhKxf7pB-XF7ATVVag@mail.gmail.com
Whole thread Raw
In response to Re: Triggers with DO functionality  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Triggers with DO functionality  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 17 February 2012 16:43, Andrew Dunstan <andrew@dunslane.net> 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.

Why not just...

CREATE OR REPLACE TRIGGER my_trigger...

-- 
Thom


pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Triggers with DO functionality
Next
From: Jay Levitt
Date:
Subject: Re: Copyright notice for contrib/cube?