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 67BAD11F6627 for ; Thu, 6 Apr 2006 10:21:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 54604-02 for ; Thu, 6 Apr 2006 10:21:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moon.antora.ru (moon.antora.ru [83.222.21.34]) by postgresql.org (Postfix) with ESMTP id CE84F11F6621 for ; Thu, 6 Apr 2006 10:21:23 -0300 (ADT) Received: from [217.26.17.26] (helo=[10.0.0.72]) by moon.antora.ru with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.60 (FreeBSD)) (envelope-from ) id 1FRUQG-00017Q-5h; Thu, 06 Apr 2006 17:21:20 +0400 Message-ID: <44351590.7050506@bankir.ru> Date: Thu, 06 Apr 2006 17:20:16 +0400 From: "Eugene E." User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050517) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Schaber CC: pgsql-sql@postgresql.org Subject: Re: have you feel anything when you read this ? References: <441EA0A7.8030601@bankir.ru> <200603201415.30719.peter_e@gmx.net> <442CC95C.1030700@bankir.ru> <20060331084503.W64402@megazone.bigpanda.com> <44324AB6.2060104@bankir.ru> <20060404071118.C19036@megazone.bigpanda.com> <4433650E.1020508@bankir.ru> <20060405071322.Y58168@megazone.bigpanda.com> <4434A207.6010600@bankir.ru> <20060405224337.Y83930@megazone.bigpanda.com> <4434C0A9.6000001@bankir.ru> <20060406041008.M82943@megazone.bigpanda.com> <44350A9B.5060109@bankir.ru> <44350DDE.8000201@logix-tt.com> In-Reply-To: <44350DDE.8000201@logix-tt.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200604/43 X-Sequence-Number: 24852 Markus Schaber wrote: > Hi, Eugene, > > Eugene E. wrote: > > >>>Okay, now pass that to strcmp or a %s format. AFAIK, the >>>"textual-form" of >>>values is meant to be a c-string. "ab\0cd\0" is not a c-string containing >>>ab\0cd, it's a c-string containing ab. >> >>WHY strcmp ?! do you really think the user is a fool ? >>if the user declared something "binary", he obviously knows what he has >>done. > > > But when the user requests the canonical _text_ representation of a byte > area data type, why do you consider him declaring it "binary"? he did not request this representation. it is _by_default_ if you wish to provide it by request, please do it. i ask you to provide minimal convertion by default, mentioned the user wants his data unchanged. and let the user interpret his own data himself. >>Since this structure provides a length of each value, you have no need >>in c-string. Why do think the user needs it ? > > A user that does not have a need in C-Strings can fetch the binary > representation, getting higher efficency for all datatypes. and lose the pretty good representation of all other columns in the same request. >>"textual-form" is just a name of actually existent convertion rule. >>i am not trying to find out a philosophy here. > > There is no philosophy but orthogonality. > > There's a textual and a binary form of datatypes. For varchar, byta, > int4, float, PostGIS geometries etc... good. i ask you to slightly change "textual" representation of bytea. > The text representation is pretty useful for human readers for _most_ > datatypes, the binary representation is much easier to parse for programs. You are right. but Who said that i can not display something ? i thougth, human-readability of some data depends completely on how CLIENT-SIDE interpret it. server do not know and should not know what data is human readable or printable... etc. > So use the binary representation for everything if you don't want to > display the data to the user directly. The problem we discuss is not about displaing or printig at all. Some applications want "textual-form" -- most applications but not only to display and in the _same_ query the same applications want bytea...