Re: Getting the function definition from oid in before firing the function

Поиск
Список
Период
Сортировка
От Mohammed Ajil
Тема Re: Getting the function definition from oid in before firing the function
Дата
Msg-id 568CC26E.6000409@student.ethz.ch
обсуждение исходный текст
Ответ на Re: Getting the function definition from oid in before firing the function  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: Getting the function definition from oid in before firing the function  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general
Hi,

Thanks for your answer!
I know that this is not the only language for triggers, but the
algorithm I have to implement only supports these triggers.
I have looked at the audit trigger, but that is not quite what I am
trying to achieve. I have implemented the stack push and pop for the
initial commands at another location, what I am trying to do now is keep
track of what triggers are fired, since they recursively can fire more
triggers.

What is an executor hook?

Regards,

Mohammed

On 01/06/2016 03:20 AM, Jim Nasby wrote:
> On 1/5/16 8:13 AM, Mohammed Ajil wrote:
>> Now my problem consists of two steps:
>> - First I need to decide if the algorithm supports the trigger type
>> (only of LANGUAGE PLPGSQL).
>
> plpgsql is NOT the only language that supports triggers.
>
>> - Second I need to get the SQL command that the function will execute.
>>
>> What I tried was the following:
>> In the file trigger.c I have found the location where the function is
>> called.
>
> I think triggers is the wrong way to approach this; it's full of holes
> (not the least of which is triggers don't fire on SELECT). You'd be much
> better off with an executor hook.
>
> Have you looked at https://github.com/2ndQuadrant/pgaudit?

--
--------------------------------------------
Mohammed Ajil
Bsc CS D-INFK
ajilm@student.ethz.ch


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

Предыдущее
От: "balajishanmugam@live.in"
Дата:
Сообщение: Postgresql 9.3 not coming up after restart in centos
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Postgresql 9.3 not coming up after restart in centos