pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian Barwick <barwick@gmx.net>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Using psql to insert character codes
Date: Wed, 14 May 2003 23:18:07 +0200
Message-ID: <200305142318.07595.barwick@gmx.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0305111828010.2399-100000@peter.localdomain>
References: <Pine.LNX.4.44.0305111828010.2399-100000@peter.localdomain>

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



view thread (8+ messages)  latest in thread

Message-ID: <200305142318.07595.barwick@gmx.net>
Permalink:  ../200305142318.07595.barwick@gmx.net/
Also on:    postgresql.org/message-id/200305142318.07595.barwick@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: barwick@gmx.net, peter_e@gmx.net
  Subject: Re: Using psql to insert character codes
  In-Reply-To: <200305142318.07595.barwick@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox