Re: Status of plperl inter-sp calling - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Status of plperl inter-sp calling
Date
Msg-id 1699.1262789186@sss.pgh.pa.us
Whole thread Raw
In response to Re: Status of plperl inter-sp calling  (Tim Bunce <Tim.Bunce@pobox.com>)
Responses Re: Status of plperl inter-sp calling
Re: Status of plperl inter-sp calling
List pgsql-hackers
Tim Bunce <Tim.Bunce@pobox.com> writes:
> For my own benefit, being a PostgreSQL novice, could you expand a little?
> For example, given two stored procedures, A and V, where V is marked
> VOLATILE and both are plperl. How would having A call V directly, within
> the plperl interpreter, cause problems?

That case is fine.  The problem would be in calling, say, VOLATILE from
STABLE.  Any SPI queries executed inside the VOLATILE function would
need to be handled under read-write not read-only rules.

Now it's perhaps possible for you to track that yourself and make sure
to call SPI with the right arguments for the type of function you're
currently in, even if you didn't get to it via the front door.  But
that's a far cry from "ignoring" the volatility property.  It seems
nontrivial to do if you try to set things up so that no plperl code is
executed during the transition from one function to another.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: fastgetattr & isNull
Next
From: Tom Lane
Date:
Subject: Re: Status of plperl inter-sp calling