X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 01BE69DCB9C for ; Mon, 20 Mar 2006 12:44:04 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15416-07 for ; Mon, 20 Mar 2006 12:44:03 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from peufeu.com (boutiquenumerique.com [82.67.9.10]) by postgresql.org (Postfix) with ESMTP id 459BC9DCA74 for ; Mon, 20 Mar 2006 12:44:02 -0400 (AST) Received: (qmail 18488 invoked from network); 20 Mar 2006 17:44:27 +0100 Received: from boutiquenumerique.com (HELO apollo13) (82.67.9.10) by boutiquenumerique.com with SMTP; 20 Mar 2006 17:44:27 +0100 To: "Eugene E." Cc: "Achilleus Mantzios" , "Peter Eisentraut" , pgsql-sql@postgresql.org Subject: Re: have you feel anything when you read this ? References: <441EA0A7.8030601@bankir.ru> <441EC1CC.4070300@bankir.ru> Message-ID: Date: Mon, 20 Mar 2006 17:44:27 +0100 From: PFC Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <441EC1CC.4070300@bankir.ru> User-Agent: Opera M2/8.51 (Linux, build 1462) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.11 required=5 tests=[AWL=0.110] X-Spam-Score: 0.11 X-Spam-Level: X-Archive-Number: 200603/311 X-Sequence-Number: 24657 > I wrote: > >>> the problem is: you'll get this four byte sequence '\000' _instead_ >>> of NUL-byte anyway. > > You wrote: > >> Your client library should take care of escaping and de-escaping. > > We both agree as you see. > > Then i am asking: > WHY should a client take care of de-escaping ? Why not to get his data > unchanged ? I can understand why you say that for something as simple as a BYTEA, but if the value to be passed to the client is an ARRAY of geometric types or something, you gonna need an open, platform-agnostic exchange format between the way postgres internally represents it and the way the client represents it (in my case, a python list containing instances of python classes representing boxes, etc, it'll be different for every language). Exporting data from postgres in binary is only useful to C programmers who can import the required struct definitions, and you still have to manage the format, it's just that you walk struct's instead of unescaping \'s