Evaluate arbitrary expression on tuple inside trigger function?

Поиск
Список
Период
Сортировка
От Tom Dunstan
Тема Evaluate arbitrary expression on tuple inside trigger function?
Дата
Msg-id CAPPfruzxVEQ8V4fay=4=1dOPyRiB7-REN2wHjK4ZK965bWH67A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Evaluate arbitrary expression on tuple inside trigger function?  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
Hi all

I'm trying to hack a trigger function to evaluate an expression on the
tuple that the trigger has been fired for, kinda like a check
constraint. I looked at ExecRelCheck in execMain.c which does
more-or-less what I want to do, and I have the parsed node tree all
ready to go. The problem that I'm facing is that ExecRelCheck uses a
passed in EState to set up the executor in the right mode, and with
the right memory context, but the EState doesn't get passed in to the
trigger function, and I can't see anything obvious hanging off the
TriggerData that does get passed in that would give me access to it.

Can anyone either point me to where I might be able to get a handle on
the current EState, or otherwise recommend a way forward?

Thanks

Tom



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add GET DIAGNOSTICS ... PG_CONTEXT in PL/PgSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Bison 3.0 updates