Re: accessing text of the query in a rule

From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: Toni Casueps <casueps(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: accessing text of the query in a rule
Date: 2005-12-02 20:48:23
Message-ID: c2d9e70e0512021248k5b00a6eek739afe6f9b82291e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/2/05, Toni Casueps <casueps(at)hotmail(dot)com> wrote:
> I am making rules for a table and I want to know what values or variables
> can I use apart from the "new..." and old... fields, for example I would
> like to read the SQL query that the user wrote that caused this rule to
> execute. Can this be done?
>

You can't see the original query but have a lot of information much relevant....

C triggers: http://www.postgresql.org/docs/current/static/trigger-interface.html
In plpgsql: http://www.postgresql.org/docs/current/static/plpgsql-trigger.html
In pltcl: http://www.postgresql.org/docs/current/static/pltcl-trigger.html
In plperl: http://www.postgresql.org/docs/current/static/plperl-triggers.html
In plpython: http://www.postgresql.org/docs/current/static/plpython-trigger.html

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2005-12-02 20:52:48 Re: createuser ignores stdin in 8.1.0?
Previous Message Tom Lane 2005-12-02 20:46:06 Re: [Fwd: Re: deadlock on the same relation]