Re: Obtaining Firing Statement clause in (pl/perlu) Trigger Function - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Obtaining Firing Statement clause in (pl/perlu) Trigger Function
Date
Msg-id 200505231026.27689.josh@agliodbs.com
Whole thread Raw
In response to Obtaining Firing Statement clause in (pl/perlu) Trigger Function  (Stef <stef@ummon.com>)
List pgsql-hackers
Stef,

>     I am trying to write a function/Trigger in pl/perl (although any
> other language which allows this is perfectly fine with me :) and I need to
> find the firing statement. I understand that if the trigger was fired in
> a long sequence, then of course, the calling statement will be the
> previous trigger.

Talk to David Fetter (author of DBI-Link) about this.  You're also probably 
unnecessarily replicating his work.

It's not currently possible, unfortunately.   Tge real way to do this would be 
through RULES.   However, RULEs currently don't give you a handle on query 
substructures like where clauses (let alone join clauses).  DF and I have 
talked about it, but it would take some major back-end hacking to enable 
it.  :-(

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-hackers by date:

Previous
From: Stef
Date:
Subject: Obtaining Firing Statement clause in (pl/perlu) Trigger Function
Next
From: Simon Riggs
Date:
Subject: Re: Speeding up the Postgres lexer