Re: [HACKERS] Possible TODO: allow arbitrary expressions in event trigger WHEN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Possible TODO: allow arbitrary expressions in event trigger WHEN
Date
Msg-id 11467.1487043275@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] Possible TODO: allow arbitrary expressions in event trigger WHEN  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: [HACKERS] Possible TODO: allow arbitrary expressions in eventtrigger WHEN  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: [HACKERS] Possible TODO: allow arbitrary expressions in eventtrigger WHEN  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> Is there a reason not to allow $SUBJECT? Specifically, it'd be nice to 
> be able to do something like WHEN tag LIKE 'ALTER%'.

Seems like it would be a seriously bad idea for such an expression to be
able to invoke arbitrary SQL code.  What if it calls a user-defined
function that tries to do DDL?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] possibility to specify template database for pg_regress
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion