Re: text and bytea - Mailing list pgsql-general

From hernan gonzalez
Subject Re: text and bytea
Date
Msg-id 48692c2d0802220754h5b05974crd3dd7e784d9fe640@mail.gmail.com
Whole thread Raw
In response to Re: text and bytea  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: text and bytea
List pgsql-general
>  It seems to me that postgres is trying to do as you suggest: text is
>  characters and bytea is bytes, like in Java.

But the big difference is that, for text type, postgresql knows "this
is a text"
but doesnt know the encoding, as my example showed. This goes against
the concept of "text vs bytes" distintion, which per se is very useful
and powerful
(specially in this Unicode world) and leads to a dubious/clumsy string api
(IMHO, as always).

> You don't indicate what
>  version you are using, this area was rejigged recently.
>

Sorry, I forget to say that my examples are for last version (8.3)

Cheers

--
Hernán J. González

pgsql-general by date:

Previous
From: Ralph Smith
Date:
Subject: v7.4 pg_dump(all) need to encode from SQL_ASCII to UTF8
Next
From: "Kynn Jones"
Date:
Subject: "RETURNS SETOF" function question