Re: Encoding Conversion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wilton Wonrath <wrwonrath(at)yahoo(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Encoding Conversion
Date: 2011-02-03 16:51:41
Message-ID: 24084.1296751901@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Wilton Wonrath <wrwonrath(at)yahoo(dot)com(dot)br> writes:
> When Im doing a conversion PostgreSQL returns SCAPES to me besides the desire
> caracter. Why ?

Somewhere between 8.2 and 9.0 convert() was redefined to take and return
bytea, not text, to reflect the fact that the data it deals in isn't
necessarily encoded in the database's character encoding. This was part
of a general tightening up to ensure that text that ought to be in the
database encoding really is.

There are some related functions now that convert between text (assumed
to be in the database encoding) and bytea strings in a specified
encoding. You probably want to switch over to using those.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bob Price 2011-02-03 17:17:30 how to avoid repeating expensive computation in select
Previous Message Steve Crawford 2011-02-03 16:47:43 Re: Why does a normally fast query run so slow when the table is in a partition?