Re: Using psql to insert character codes

Поиск
Список
Период
Сортировка
От Ian Barwick
Тема Re: Using psql to insert character codes
Дата
Msg-id 200305142318.07595.barwick@gmx.net
обсуждение исходный текст
Ответ на Re: Using psql to insert character codes  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Using psql to insert character codes
Список 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 по дате отправления:

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: PL/pgSQL: Logging Trigger. Advice/comments/other?
Следующее
От: Joe Conway
Дата:
Сообщение: Re: PL/pgSQL: Logging Trigger. Advice/comments/other?