Re: text and bytea - Mailing list pgsql-general

From Tom Lane
Subject Re: text and bytea
Date
Msg-id 1195.1203967053@sss.pgh.pa.us
Whole thread Raw
In response to Re: text and bytea  ("hernan gonzalez" <hgonzalez@gmail.com>)
Responses Re: text and bytea
List pgsql-general
"hernan gonzalez" <hgonzalez@gmail.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: text and bytea
Next
From: "Wenjian Yang"
Date:
Subject: give a hand to a user having trouble with MySQL?