Re: text and bytea

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "hernan gonzalez" <hgonzalez(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: text and bytea
Date: 2008-02-25 19:17:33
Message-ID: 1195.1203967053@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"hernan gonzalez" <hgonzalez(at)gmail(dot)com> writes:
> test=# create view vchartest as
> select encode(convert_to(c,'LATIN9'),'escape') as c1 from chartest;

Hmm. This isn't a very sensible combination that you've written here,
but I see the point: encode(..., 'escape') is broken in that it fails
to convert high-bit-set bytes into \nnn sequences. At least in
multibyte backend encodings, we *must* do that to produce valid textual
output. I suspect that for consistency we should do it regardless of
backend encoding.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wenjian Yang 2008-02-25 19:46:25 give a hand to a user having trouble with MySQL?
Previous Message Tom Lane 2008-02-25 19:12:03 Re: text and bytea