Re: Using psql to insert character codes - Mailing list pgsql-sql

From Ian Barwick
Subject Re: Using psql to insert character codes
Date
Msg-id 200305142318.07595.barwick@gmx.net
Whole thread Raw
In response to Re: Using psql to insert character codes  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Using psql to insert character codes  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
On Sunday 11 May 2003 18:54, Peter Eisentraut wrote:
> Ian Barwick writes:
> > I can do this:
> > INSERT INTO my_tbl (unitxt) VALUE(encode(decode('c3a4','hex'), 'escape'))
> >
> > Is there any other, shorter way of doing the same?
>
> Use octal escapes: '\303\244';

Aha, thanks.

That seems to imply though that this statement in the docs:
"...where xxx is an octal number, is the character with the corresponding
ASCII code."

http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=sql-syntax.html

is not completely correct. Maybe it should read something like:

"...where xxx is an octal number which corresponds to a valid character in the
database encoding."


Ian Barwick
barwick@gmx.net


pgsql-sql by date:

Previous
From: Larry Rosenman
Date:
Subject: PL/pgSQL: Logging Trigger. Advice/comments/other?
Next
From: Joe Conway
Date:
Subject: Re: PL/pgSQL: Logging Trigger. Advice/comments/other?