From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Status of plperl inter-sp calling |
Date: | 2010-01-06 16:07:35 |
Message-ID: | 4B44B547.2090901@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)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);
>
>
OK, but won't that automatically supply the value from the function
called from postgres, which will be the right thing? i.e. if postgres
calls S which direct-calls V which calls SPI_execute(), the value of
current_call_data->prodesc->fn_readonly in the call above will be
supplied from S, not V, since S will be at the top of the plperl call stack.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2010-01-06 16:11:02 | Re: pg_migrator issues |
Previous Message | Robert Haas | 2010-01-06 16:07:04 | Re: patch - per-tablespace random_page_cost/seq_page_cost |