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

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Getting the function definition from oid in before firing the function
Дата
Msg-id 568C79F2.2040306@BlueTreble.com
обсуждение исходный текст
Ответ на Getting the function definition from oid in before firing the function  (Mohammed Ajil <ajilm@student.ethz.ch>)
Ответы Re: Getting the function definition from oid in before firing the function  (Mohammed Ajil <ajilm@student.ethz.ch>)
Список pgsql-general
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?
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Cannot upgrade from 9.3 to 9.4 using pg_upgrade
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: to_timestamp alternatives