From: Eugene E. <sad@bankir.ru>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Achilleus Mantzios <achill@matrix.gatewaynet.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: have you feel anything when you read this ?
Date: Mon, 20 Mar 2006 15:44:26 +0300
Message-ID: <441EA3AA.3080909@bankir.ru> (raw)
In-Reply-To: <20060320122749.GC12564@surnet.cl>
References: <200603201251.11255.peter_e@gmx.net>
<Pine.LNX.4.44.0603201504250.22800-100000@matrix.gatewaynet.com>
<20060320121354.GA12564@surnet.cl>
<441E9DEC.2070805@bankir.ru>
<20060320122749.GC12564@surnet.cl>
Alvaro Herrera wrote:
> Eugene E. wrote:
>
>>Alvaro Herrera wrote:
>
>
>>>text is not bytea.
>>
>>source says:
>>
>>typedef text varlena;
>>typedef bytea varlena;
>
>
> This means that as far as the C type system is concerned, both bytea and
> text are treated as "struct varlena". It doesn't mean that they are
> processed by the same input/output functions, which they aren't.
>
> NUL bytes are preserved in bytea, and used as terminators in text. I
> don't find this surprising at all, do you?
I do found surprising it.
since both (text and bytea) I/O functions has CSTRING arguments and
resut type. - this only means a user should perform some unescaping on
the bytea value he got. THE SAME THING he should do with a string value
if he decide to use type text and to escape NUL-bytes before input.
then what a difference bitween those types except strlen() ?
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, alvherre@commandprompt.com, achill@matrix.gatewaynet.com, peter_e@gmx.net
Subject: Re: have you feel anything when you read this ?
In-Reply-To: <441EA3AA.3080909@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