"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
> 2008/6/1 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
In response to
pgsql-hackers by date
|Next:||From: Robert Hodges||Date: 2008-06-01 15:58:59|
|Subject: Re: Core team statement on replication in PostgreSQL|
|Previous:||From: Pavel Stehule||Date: 2008-06-01 15:43:48|
|Subject: Re: explain doesn't work with execute using|