Re: text and bytea - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: text and bytea
Date
Msg-id 20080222153350.GE15579@svana.org
Whole thread Raw
In response to text and bytea  ("hernan gonzalez" <hgonzalez@gmail.com>)
Responses Re: text and bytea
Re: text and bytea
List pgsql-general
On Thu, Feb 21, 2008 at 02:34:15PM -0200, hernan gonzalez wrote:
> (After dealing a while with this, and learning a little, I though of
> post this as comment in the docs, but perhaps someone who knows better
> can correct or clarify)

It seems to me that postgres is trying to do as you suggest: text is
characters and bytea is bytes, like in Java. You don't indicate what
version you are using, this area was rejigged recently.

The most surprising this is that to_ascii won't accept a bytea. TBH the
whole to_ascii function seems somewhat half-baked. If what you're
trying to do is remove accents, there are perl functions around that do
that. Basically, the switch to a different normal form then drop all
the accent characters.

Essentially, Postgres supports UTF-8, but doesn't understand Unicode
characters much at all.

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

Attachment

pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: current_query pg_stat_activity column
Next
From: Erik Jones
Date:
Subject: Re: Unique indicies