Re: have you feel anything when you read this ?

Поиск
Список
Период
Сортировка
От Eugene E.
Тема Re: have you feel anything when you read this ?
Дата
Msg-id 44351590.7050506@bankir.ru
обсуждение исходный текст
Ответ на Re: have you feel anything when you read this ?  (Markus Schaber <schabi@logix-tt.com>)
Ответы Re: have you feel anything when you read this ?  (Markus Schaber <schabi@logix-tt.com>)
Список pgsql-sql
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...





В списке pgsql-sql по дате отправления:

Предыдущее
От: Markus Schaber
Дата:
Сообщение: Re: have you feel anything when you read this ?
Следующее
От: Guy Fraser
Дата:
Сообщение: Re: pgcrypto-crypt