Re: How to fire triggers just on "top" level DML

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: How to fire triggers just on "top" level DML
Дата
Msg-id 4D3713130200002500039839@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: How to fire triggers just on "top" level DML  ("A.M." <agentm@themactionfaction.com>)
Ответы Re: How to fire triggers just on "top" level DML
Re: How to fire triggers just on "top" level DML
Список pgsql-general
"A.M." <agentm@themactionfaction.com> wrote:

> Most PLs include some session-specific storage. In PL/Perl, it is
> %_SHARED.  Setting a flag there should do the trick. If you are
> using a PL which does not have such a notion (like plpgsql), you
> can add a call in your triggers to a function written in a PL
> which does support this. Alternatively, a C function which
> sets/checks a global flag would work as well.

I thought it might come to that.  I'm comfortable writing C
functions, and we're not using any languages so far besides C, SQL,
and plpgsql, so I'd probably use C.  If I'm going that far, though,
I'd be rather inclined to implement a TG_DEPTH variable (as being
easier for us to use) and offer it to the community in case there's
anyone else who would find this useful.  If that turns out to be
harder than I think, I'll fall back to what you outlined here.

Thanks!

-Kevin

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: undefined symbol PQconnectionNeedsPassword referenced by file pg_ctl.o
Следующее
От: "A.M."
Дата:
Сообщение: Re: How to fire triggers just on "top" level DML