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 9D24A9DC8E1 for ; Mon, 20 Mar 2006 12:00:41 -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 07301-04 for ; Mon, 20 Mar 2006 12:00:39 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from jandor.look.ca (theta1.look.ca [207.136.80.122]) by postgresql.org (Postfix) with ESMTP id 76D7C9DD07B for ; Mon, 20 Mar 2006 12:00:39 -0400 (AST) Received: from 209-161-222-80.dsl.look.ca ([209.161.222.80]) by jandor.look.ca with esmtp (Exim 4.20) id 1FLMo1-0005Tq-L2; Mon, 20 Mar 2006 16:00:29 +0000 From: Rod Taylor To: "Eugene E." Cc: PFC , Achilleus Mantzios , Peter Eisentraut , pgsql-sql@postgresql.org In-Reply-To: <441EC1CC.4070300@bankir.ru> References: <441EA0A7.8030601@bankir.ru> <441EC1CC.4070300@bankir.ru> Date: Mon, 20 Mar 2006 10:58:08 -0500 Message-Id: <1142870288.35058.29.camel@home> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port X-SA-Exim-Mail-From: pg@rbt.ca Subject: Re: have you feel anything when you read this ? Content-Type: text/plain Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 3.1 (built Tue Feb 24 05:09:27 GMT 2004) X-SA-Exim-Scanned: Yes X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.099 required=5 tests=[AWL=0.099] X-Spam-Score: 0.099 X-Spam-Level: X-Archive-Number: 200603/309 X-Sequence-Number: 24655 On Mon, 2006-03-20 at 17:53 +0300, Eugene E. wrote: > 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 ? Request the data be delivered to you in binary format instead of text format (see PQexecParams, PQexecPrepared, etc). When you request text format it requires some escaping to occur for obvious reasons, but you don't need to worry about the length of the data. When you request binary escaping is not required but you do need to worry about the length of the data. Pick the method that suits you best. --