Triggers with DO functionality

From: Thom Brown <thom(at)linux(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Triggers with DO functionality
Date: 2012-02-17 13:22:14
Message-ID: CAA-aLv4m=f9cc1zcUzM49pE8+2NpytUDraTgfBmkTOkMN_wO2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2012-02-17 13:31:56 Re: Command Triggers
Previous Message Dimitri Fontaine 2012-02-17 13:19:21 Re: Command Triggers