Re: [HACKERS] Possible TODO: allow arbitrary expressions in eventtrigger WHEN

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Possible TODO: allow arbitrary expressions in eventtrigger WHEN
Дата
Msg-id CA+Tgmoaq10rN_mSqT7H3Xnzk8JOwPyLKw78kncxEfDvcQPXOgA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Possible TODO: allow arbitrary expressions in event trigger WHEN  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Feb 13, 2017 at 10:34 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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?

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Higuchi, Daisuke"
Дата:
Сообщение: [HACKERS] new high availability feature for the system with both asynchronousand synchronous replication
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Re: [COMMITTERS] pgsql: Remove all references to "xlog"from SQL-callable functions in p