Sunday, June 1, 2008

Re: [HACKERS] explain doesn't work with execute using

"Pavel Stehule" <pavel.stehule@gmail.com> writes:
> 2008/6/1 Tom Lane <tgl@sss.pgh.pa.us>:
>> This seems to be correctable with a one-line patch: make SPI_cursor_open
>> set the CONST flag on parameters it puts into the portal (attached).
>> I'm not entirely sure if it's a good idea or not --- comments?

> We can do less invasive patch - it's much more ugly, but don't change
> any other behave. I am afraid, so one-line patch can change behave of
> explain statements in some cases where using variables is correct.

If you can name a case where that is correct, then I'll worry about
this, but offhand I don't see one.

What do you think a "less invasive" patch would be, anyway? I don't
buy that, say, having SPI_cursor_open_with_args set the flag but
SPI_cursor_open not do so is any safer. There is no difference between
the two as to what might get executed, so if there's a problem then
both would be at risk.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

No comments: