On Fri, Feb 22, 2008 at 01:54:46PM -0200, hernan gonzalez wrote:
> >  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).

Umm, I think all you showed was that the to_ascii() function was
broken. Postgres knows exactly what encoding the string is in, the
backend encoding: in your case UTF-8.

Now, it would be nice if postgres could handle other encodings in the
backend, but there's no agreement on how to implement that feature so
it isn't implemented.

Have a nice day,
-- 
Martijn van Oosterhout   <[EMAIL PROTECTED]>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution 
> inevitable.
>  -- John F Kennedy

Attachment: signature.asc
Description: Digital signature

Reply via email to