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 9580811F6621 for ; Thu, 6 Apr 2006 09:47:15 -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 45560-08 for ; Thu, 6 Apr 2006 09:47:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (unknown [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 6708111F6676 for ; Thu, 6 Apr 2006 09:47:12 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (Ta23b.t.pppool.de [89.55.162.59]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id F2451656C0 for ; Thu, 6 Apr 2006 14:48:00 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 0EA9C18167709 for ; Thu, 6 Apr 2006 14:47:27 +0200 (CEST) Message-ID: <44350DDE.8000201@logix-tt.com> Date: Thu, 06 Apr 2006 14:47:26 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: 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> In-Reply-To: <44350A9B.5060109@bankir.ru> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 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/42 X-Sequence-Number: 24851 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"? > WHY c-string ? the user only wants to get PGresult structure. And he does request the _text_ represenation of the datatypes in this structure. > 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. > "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... >> I think I don't exactly agree with this description, but I'm unclear >> exactly what you're saying. Are you saying that textual-form is the >> useful representation, or are you saying that textual-form is the >> representation and it is useful? > the actual representasion of most types is pretty useful. The text representation is pretty useful for human readers for _most_ datatypes, the binary representation is much easier to parse for programs. So use the binary representation for everything if you don't want to display the data to the user directly. One could speculate that the textual representation is just a little help for "generic" tools like pg_dump, pgadmin or psql that display data to the user without having any knowledge of the specific datatypes (and without the possibility to have such knowledge). Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org