PQescapeByteaConn - returns wrong string for PG9.1 Beta3

From: "Petro Meier" <Petro85(at)gmx(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PQescapeByteaConn - returns wrong string for PG9.1 Beta3
Date: 2011-07-27 06:51:22
Message-ID: 20110727065122.205180@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Normal 0 21 false
false false DE X-NONE X-NONE

MicrosoftInternetExplorer4
















If  I use PQescapeByteaConn() for a conenction to a PG9.1 Beta3 server,
this function returns (e.g.) "\xea2abd8ef31...(and so on.)...".

Here the problem: there should be a second backslash in the prefix.
The SQL Statement which uses this string (INSERT statement in my case)
returns with an error ("Invalid byte sequence..."). If I add the second
backslash manually everything works fine.

When connecting to a PG9.0 server and using this function, the
return value is correct (with two backslashes): "\\xea2abd8ef31...( and so
on.)...".

This should be a bug in PG9.1 Beta3

  Regards

Petro
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikhil Sontakke 2011-07-27 10:39:59 Re: Check constraints on partition parents only?
Previous Message Noah Misch 2011-07-27 03:35:38 Re: sinval synchronization considered harmful