| From: | Ian Barwick <barwick(at)gmx(dot)net> |
|---|---|
| To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Using psql to insert character codes |
| Date: | 2003-05-14 21:18:07 |
| Message-ID: | 200305142318.07595.barwick@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)gmx(dot)net
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joe Conway | 2003-05-14 21:32:52 | Re: PL/pgSQL: Logging Trigger. Advice/comments/other? |
| Previous Message | Larry Rosenman | 2003-05-14 20:04:21 | PL/pgSQL: Logging Trigger. Advice/comments/other? |