From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Possible TODO: allow arbitrary expressions in event trigger WHEN |
Date: | 2017-02-14 23:26:56 |
Message-ID: | CA+Tgmoaq10rN_mSqT7H3Xnzk8JOwPyLKw78kncxEfDvcQPXOgA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 13, 2017 at 10:34 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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?
Yeah. I remember thinking about this and deciding that allowing real
expressions there was totally intractable. I don't remember what all
the reasons were, but what Tom's talking about may have been at least
part of it.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-02-15 00:05:16 | Re: Re: [COMMITTERS] pgsql: Remove all references to "xlog" from SQL-callable functions in p |
Previous Message | Higuchi, Daisuke | 2017-02-14 23:23:58 | new high availability feature for the system with both asynchronous and synchronous replication |