Fetch query which triggered a rule

From: "Jonatan Evald Buus" <jonatan(dot)buus(at)cellpointmobile(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Fetch query which triggered a rule
Date: 2008-11-20 11:24:59
Message-ID: 113ce31b0811200324o672497d0jccb69d2e279697e2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,
Is it possible to fetch the query which triggered a rule?

I.e. suppose I create the following rule:
CREATE RULE MyRule AS ON Select TO MyTable_Tbl DO INSTEAD
process_query($sql);

Where $sql represents the query which triggered the rule.

Appreciate the input

Cheers
Jona

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-11-20 11:29:20 Re: return MAX and when it happened
Previous Message Craig Ringer 2008-11-20 11:24:42 Re: transaction_read_only effects on performance, actual meaning (was: How to reduce impact of a query)