Re: Possible TODO: allow arbitrary expressions in event trigger WHEN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible TODO: allow arbitrary expressions in event trigger WHEN
Date: 2017-02-14 03:34:35
Message-ID: 11467.1487043275@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-02-14 03:36:11 Re: Provide list of subscriptions and publications in psql's completion
Previous Message Andres Freund 2017-02-14 02:50:37 Re: possibility to specify template database for pg_regress