Wednesday, September 17, 2008

Re: [SQL] Trigger Procedure Error: NEW used in query that is not in a rule


On Sat, Aug 11, 2007 at 9:07 PM, hubert depesz lubaczewski
<> wrote:
> On Sat, Aug 11, 2007 at 02:45:09AM -0500, Javier Fonseca V. wrote:
>> I think that it's working alright except for the next line:
> doing this in plpgsql is very complicated (or even impossible assuming
> that any table can have the same trigger). i would rather suggest using
> pl/perl - writing something like this in pl/perl is very simple.

I am in the same situation where I would like to execute a query similar to
SELECT new.*';

I've looked at the plperl documentation, and experimented a bit, but
I'm not even sure how to start this in pl/perl. I hoped to extract
columns from $_TD->{new} but it doesn't seem to work.
Would you have a little example on how you would do it?

Thanks in advance!


> depesz
> --
> quicksil1er: "postgres is excellent, but like any DB it requires a
> highly paid DBA. here's my CV!" :)
> - blog dla ciebie (i moje CV)
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?

Web database:
Free Software Developers Meeting:

Sent via pgsql-sql mailing list (
To make changes to your subscription:

No comments: