Boszormenyi Zoltan írta:
> Greg Smith írta:
>> 4) Investigate and be explicit about the potential breakage here both
>> for libpq clients and at least one additional driver too. If I saw a
>> demonstration that this didn't break the JDBC driver, for example, I'd
>> feel a lot better about the patch.
> ... (JDBC discussed to be non-vulnerable)
> The question is whether new versions of psqlODBC and the old
> ones shipped in unixODBC handle the change well.
I looked at the unixODBC PG driver sources. Both the "old" and "new"
versions return rowcount for STMT_TYPE_SELECT as the number of
tuples returned, it doesn't look at the command status. But they both seems
to be broken for INSERTs, as the source interprets the number found
after the first ' ' (space) character, they would return 0 for WITHOUT OIDS
case. I am talking about these files:
Look at the SQLRowCount() function.
The current psqlODBC driver versions do it in a similar way.
They don't look at the actual command tag, if there is a space character
in the command status string after trimming it, the string after the space
gets interpreted with atoi(). This code also ignores that INSERT returns
2 values, the first value will be returned for rowcount.
This means that the more recent ODBC drivers seem to start returning
rowcount for utility SELECTs with this protocol change.
I haven't tested it though.
So, the latest JDBC won't change behaviour without code changes,
ODBC may or may not, depending on the version.
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics
Cybertec Schönig & Schönig GmbH
In response to
pgsql-hackers by date
|Next:||From: Heikki Linnakangas||Date: 2010-02-11 12:20:01|
|Subject: Re: Parameter name standby_mode|
|Previous:||From: Bart Samwel||Date: 2010-02-11 12:09:33|
|Subject: Re: Avoiding bad prepared-statement plans.|