pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eugene E. <sad@bankir.ru>
To: Markus Schaber <schabi@logix-tt.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: have you feel anything when you read this ?
Date: Thu, 06 Apr 2006 17:20:16 +0400
Message-ID: <44351590.7050506@bankir.ru> (raw)
In-Reply-To: <44350DDE.8000201@logix-tt.com>
References: <Pine.LNX.4.44.0603201522410.22894-100000@matrix.gatewaynet.com>
	<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>

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...






view thread (47+ messages)  latest in thread

Message-ID: <44351590.7050506@bankir.ru>
Permalink:  ../44351590.7050506@bankir.ru/
Also on:    postgresql.org/message-id/44351590.7050506@bankir.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sad@bankir.ru, schabi@logix-tt.com
  Subject: Re: have you feel anything when you read this ?
  In-Reply-To: <44351590.7050506@bankir.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox