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

Re: PQescapeString handling of \0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Igor Shevchenko <igor(at)carcass(dot)ath(dot)cx>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PQescapeString handling of \0
Date: 2003-09-29 18:22:01
Message-ID: 27075.1064859721@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Igor Shevchenko <igor(at)carcass(dot)ath(dot)cx> writes:
> Here's a patch which makes PQescapeString stop escaping when \0 is seen.

Hm.  Is that really the right behavior?  Given that the function is
defined to take a counted string rather than a null-terminated string,
I'd sort of expect it to turn \0 into "\000" or some such.  Of course,
given that this could overflow the specified size of the return buffer,
one might simply conclude that the defined API is broken ...

			regards, tom lane

In response to

Responses

pgsql-interfaces by date

Next:From: Igor ShevchenkoDate: 2003-09-29 19:15:20
Subject: Re: PQescapeString handling of \0
Previous:From: Igor ShevchenkoDate: 2003-09-29 16:49:26
Subject: PQescapeString handling of \0

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