Re: [GENERAL] Getting the function definition from oid in before firing the function

2016-01-06 Thread Michael Paquier
On Wed, Jan 6, 2016 at 4:29 PM, Mohammed Ajil wrote: > What is an executor hook? Here you go, with a particular focus on the ones names Executor*_hook: https://wiki.postgresql.org/images/e/e3/Hooks_in_postgresql.pdf -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] Getting the function definition from oid in before firing the function

2016-01-06 Thread Mohammed Ajil
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 c

Re: [GENERAL] Getting the function definition from oid in before firing the function

2016-01-05 Thread Jim Nasby
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

[GENERAL] Getting the function definition from oid in before firing the function

2016-01-05 Thread Mohammed Ajil
Dear Postgres Team, For my thesis about secure access control for database systems I need to implement a new decision algorithm for deciding if commands can be executed. For that algorithm to work I need to keep a stack that holds all the commands that are currently running, like a stacktrace. Ea