Re: text and bytea

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: hernan gonzalez <hgonzalez(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: text and bytea
Date: 2008-02-22 15:33:50
Message-ID: 20080222153350.GE15579@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2008-02-22 15:35:14 Re: Unique indicies
Previous Message Andrew Sullivan 2008-02-22 15:30:28 Re: current_query pg_stat_activity column