Re: explain doesn't work with execute using - Mailing list pgsql-hackers

From Tom Lane
Subject Re: explain doesn't work with execute using
Date
Msg-id 21755.1212335752@sss.pgh.pa.us
Whole thread Raw
In response to Re: explain doesn't work with execute using  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Responses Re: explain doesn't work with execute using  ("Pavel Stehule" <pavel.stehule@gmail.com>)
List pgsql-hackers
"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


pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: explain doesn't work with execute using
Next
From: Robert Hodges
Date:
Subject: Re: Core team statement on replication in PostgreSQL