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