Re: PQescapeString handling of \0

From: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: greg(at)turnstep(dot)com, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PQescapeString handling of \0
Date: 2003-10-03 15:51:02
Message-ID: 20031003155101.GC75826@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Fri, Oct 03, 2003 at 11:31:02AM -0400, Tom Lane wrote:
>
> So essentially PQescapeString is going to become like strncpy --- stop
> at either \0 or the given count.

I've no idea whether this makes sense, but as a matter of style, shouldn't
strings containing '\0's be escaped as binary strings anyway? And if we're
going to see multibyte encodings growing in popularity (lots of zeroes and
"high" byte values), perhaps PQescapeString should even be deprecated?

Jeroen

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2003-10-03 16:02:03 Re: PQescapeString handling of \0
Previous Message Tom Lane 2003-10-03 15:31:02 Re: PQescapeString handling of \0