Re: Event Triggers reduced, v1

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: Event Triggers reduced, v1
Дата
Msg-id m2fw99sx4y.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: Event Triggers reduced, v1  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Event Triggers reduced, v1  (Robert Haas <robertmhaas@gmail.com>)
Re: Event Triggers reduced, v1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I'd really like to not have to change the catalog again in every
> patch, because if we do that then we are just saying we're going to
> rewrite this patch completely every time we want to add a new feature,
> which kind of defeats the purpose IMHO.

Fair enough.

> So let's try to hammer something out now.  The obvious thing that
> occurs to me is to have a column in the catalog that is a 2-D array of
> text, with the first element of each array being something like "tag"
> or "subtag" (i.e. event_trigger_variable) and the remaining array
> elements being a list of legal values.  That is:
>
> WHEN thingy IN thingy IN ('item1', 'item2') AND otherthingy IN ('foo', 'bar')
>
> would be represented as this array:
>
> {{thingy,item1,item2},{otherthingy,foo,bar}}
>
> This would allow us to support 0 or more WHERE clauses, each of the
> form "thing IN (value1, value2, ...)".  Is that general enough for
> every use case that you can foresee, or do we need more?

Given what I foresee, simply having another columns in there named
evtstags with the exact same content as evttags would be the simplest
and most natural implementation, really.

I don't foresee more generic needs here, unless you can convince me that
we need both a. a full stack of arbitrarily nested commands and b. a way
to match and target any level of that stack.

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Patch: add conversion from pg_wchar to multibyte
Следующее
От: "Xiong He"
Дата:
Сообщение: Re: How to extend server side encoding GBK