Re: sql_drop Event Triggerg

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: sql_drop Event Triggerg
Дата
Msg-id 20130308141816.GA5352@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: sql_drop Event Triggerg  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: sql_drop Event Triggerg  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas escribió:
> On Tue, Mar 5, 2013 at 12:45 PM, Alvaro Herrera
> <alvherre@2ndquadrant.com> wrote:
> > Hmm, maybe I should be considering a pair of macros instead --
> > UTILITY_START_DROP and UTILITY_END_DROP.  I'll give this a try.  Other
> > ideas are welcome.
>
> That seems like a possibly promising idea.  I do wonder how well any
> of this is going to scale.

I did followup with a patch implementing that; did you see it?

> Presumably people are going to want
> similar things for CREATE and (hardest) ALTER.  Seems like
> ProcessUtility() could get pretty messy and confusing.  But I don't
> have a better idea, either.  :-(

Well, the first thing that we need to settle is the user interface.
Normalized command string don't seem to cut it; requiring users to write
SQL parsers is rather unfriendly IMHO.  The current idea of having a
function that returns objects affected by the command seems relatively
sensible.  For drops, it seems pretty straighforward so far.  For CREATE
it's probably somewhat more involved, but seems doable in principle (but
yes, we're going to have to sprinkle ProcessUtility() with a lot of
UTILITY_START/END_CREATE calls).

Not sure about ALTER; maybe we will need a completely different idea to
attack that.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Materialized views WIP patch
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Parameterized paths vs index clauses extracted from OR clauses