PQescapeByteaConn - returns wrong string for PG9.1 Beta3

Поиск
Список
Период
Сортировка
От Petro Meier
Тема PQescapeByteaConn - returns wrong string for PG9.1 Beta3
Дата
Msg-id 20110803131906.116290@gmx.net
обсуждение исходный текст
Ответы Re: PQescapeByteaConn - returns wrong string for PG9.1 Beta3  ("ktm@rice.edu" <ktm@rice.edu>)
Re: PQescapeByteaConn - returns wrong string for PG9.1 Beta3  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
<p class="MsoNormal">Please let me clarify the bug:<p class="MsoNormal"> <p class="MsoNormal">CREATE TABLE
"testtable"<pclass="MsoNormal">(<p class="MsoNormal"><span style="mso-spacerun:yes">  </span>"ID" integer NOT NULL,<p
class="MsoNormal"><spanstyle="mso-spacerun:yes">  </span>"BinaryContents" bytea<p class="MsoNormal">);<p
class="MsoNormal"> <pclass="MsoNormal">INSERT INTO "testtable" ("ID", "BinaryContents") values (1, E'\xea2abd8ef3');<p
class="MsoNormal"> <pclass="MsoNormal">returns "invalid byte sequence". <p class="MsoNormal"> <p
class="MsoNormal">'\xea2abd8ef3'is the string delivered by the PG 9.1 Beta3 server when calling PQescapeByteaConn(). It
cannotbe further processed by the server itself afterwards! There is a leading '\' missing. <p class="MsoNormal"> <p
class="MsoNormal">Whencalling the function for a PG 9.0.1 server, then the result (correctly) is '\\xea2abd8ef3' (with
adouble-backslash!), and then the insert works fine, both, with PG9.1 Beta3 and PG9.0.1<p class="MsoNormal"> <p
class="MsoNormal">Itis a serious issue, as it will break all existing PostgreSQL applications that deal with binary
contentsand use PQescapeByteaConn().<p class="MsoNormal"> <p class="MsoNormal">Best regards<p
class="MsoNormal">Petro<divclass="signature"><br /><br /><br />-- <br />Empfehlen Sie GMX DSL Ihren Freunden und
Bekanntenund wir<br />belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de</div> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vorarlberger
Дата:
Сообщение: possible new feature: asynchronous sql or something like oracles dbms_job.submit
Следующее
От: Bruce Momjian
Дата:
Сообщение: Reduce WAL logging of INSERT SELECT