From: Boszormenyi Zoltan on
Kevin Grittner �rta:
> Boszormenyi Zoltan <zb(a)cybertec.at> wrote:
>
>
>> attached is a patch that adds the missing feature
>>
>
>
>> I certainly feel that this should be applied to 9.0 as a bugfix.
>>
>
> Those two statements seem to contradict one another.

PostgreSQL 8.3 or so added WHERE CURRENT OF <curname> at the SQL level.

9.0 added ECPG's dynamic cursorname (a char variable carries the actual
cursor name)
but the WHERE CURRENT OF part was not converted, which was definitely an
oversight. Whether this is a "missing feature" or a "bugfix", it's only
a difference in
points of view. I think this patch belongs to 9.0.

> Is there some
> bug manifestation beyond an unimplemented feature this fixes?
> Without this, is there some regression going from 8.4 to 9.0?
>

I haven't looked at 8.4's regression tests but pgtypeslib/numeric.c in
8.4.4 has
the same problem, so the second patch (at least the numeric.c part) can be
applied there as well, maybe in even older branches.

Best regards,
Zolt�n B�sz�rm�nyi


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

From: Boszormenyi Zoltan on
Kevin Grittner �rta:
> Michael Meskes <michael(a)fam-meskes.de> wrote:
>
>> All prior ECPG versions were fine because dynamic cursor names
>> were only added in 9.0. Apparently only this one place was
>> missed. So this is a bug in the new feature, however not such a
>> major one that it warrants the complete removal IMO. I'd prefer to
>> fix this in 9.0.1.
>>

As we are so late in the beta phase, we can live with that, hopefully
you will find time by then to review the patch which is actually not
that complex, only a bit large. The part of ECPGdo() that deals with
auto-preparing statements is moved closer to calling ecpg_execute(),
after the varargs are converted to stmt->inlist and ->outlist.

>> Hope this cleans it up a bit.
>>
>
> Thanks. I think I get it now.
>
> To restate from another angle, to confirm my understanding: UPDATE
> WHERE CURRENT OF is working for cursors with the name hard-coded in
> the embedded statement, which is the only way cursor names were
> allowed to be specified prior to 9.0; 9.0 implements dynamic cursor
> names, allowing you to use a variable for the cursor name; but this
> one use of a cursor name isn't allowing a variable yet. Do I have
> it right? (If so, I now see why it would be considered a bug.)
>

Yes, you understand it correctly.

Best regards,
Zolt�n B�sz�rm�nyi


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