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 2732.1262793361@sss.pgh.pa.us
Whole thread Raw
In response to Re: Status of plperl inter-sp calling  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Status of plperl inter-sp calling
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> I don't understand that phrase "call SPI with the right arguments for 
> the type of function you're currently in". What calls that we make from 
> plperl code would have different arguments depending on the volatility 
> of the function?

eg, in plperl_spi_exec,
       spi_rv = SPI_execute(query, current_call_data->prodesc->fn_readonly,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                           limit);
 

> If a cached plan is going to behave differently, I'd be 
> inclined to say that we should only allow direct inter-sp calling to 
> volatile functions from volatile functions - if U understand you right 
> the only problem could be caused by calling in this direction, a 
> volatile function calling a stable function would not cause a problem. 

The other way is just as wrong.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Status of plperl inter-sp calling
Next
From: Robert Haas
Date:
Subject: Re: patch - per-tablespace random_page_cost/seq_page_cost