Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Normal        0                        21                        false      
  false        false                DE        X-NONE        X-NONE          

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 

        This should be a bug in PG9.1 Beta3        


NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren:


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group