X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 50645D1B50F for ; Fri, 3 Oct 2003 15:52:00 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 78534-06 for ; Fri, 3 Oct 2003 12:51:10 -0300 (ADT) Received: from mxzilla4.xs4all.nl (mxzilla4.xs4all.nl [194.109.6.48]) by svr1.postgresql.org (Postfix) with ESMTP id C052CD1B4F2 for ; Fri, 3 Oct 2003 12:51:09 -0300 (ADT) Received: from xs1.xs4all.nl (xs1.xs4all.nl [194.109.3.11]) by mxzilla4.xs4all.nl (8.12.10/8.12.10) with ESMTP id h93Fp7hJ034734; Fri, 3 Oct 2003 17:51:08 +0200 (CEST) Received: from xs1.xs4all.nl (jtv@localhost.xs4all.nl [127.0.0.1]) by xs1.xs4all.nl (8.12.9/8.12.9) with ESMTP id h93Fp7dN081316; Fri, 3 Oct 2003 17:51:07 +0200 (CEST) (envelope-from jtv@xs4all.nl) Received: (from Unknown UID 8109@localhost) by xs1.xs4all.nl (8.12.9/8.12.9/Submit) id h93Fp2Lx081315; Fri, 3 Oct 2003 17:51:02 +0200 (CEST) (envelope-from jtv) Date: Fri, 3 Oct 2003 17:51:02 +0200 From: "Jeroen T. Vermeulen" To: Tom Lane Cc: greg@turnstep.com, pgsql-interfaces@postgresql.org Subject: Re: PQescapeString handling of \0 Message-ID: <20031003155101.GC75826@xs4all.nl> Mail-Followup-To: Tom Lane , greg@turnstep.com, pgsql-interfaces@postgresql.org References: <19872.1065195062@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19872.1065195062@sss.pgh.pa.us> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/3 X-Sequence-Number: 4492 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