Triggers with DO functionality - Mailing list pgsql-hackers

From Thom Brown
Subject Triggers with DO functionality
Date
Msg-id CAA-aLv4m=f9cc1zcUzM49pE8+2NpytUDraTgfBmkTOkMN_wO2w@mail.gmail.com
Whole thread Raw
Responses Re: Triggers with DO functionality  ("David E. Wheeler" <david@justatheory.com>)
Re: Triggers with DO functionality  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Hi,

This may have already been discussed before, but I can't find any
mention of it.  Would it be desirable to add support for triggers that
contain their own anonymous functions (i.e. DO)?

So instead of

CREATE TRIGGER...
EXECUTE PROCEDURE functioname();

you'd have:

CREATE TRIGGER...
DO $$
...
$$;

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?

-- 
Thom


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Command Triggers
Next
From: Dimitri Fontaine
Date:
Subject: Re: Command Triggers