Using psql to insert character codes

Поиск
Список
Период
Сортировка
От Ian Barwick
Тема Using psql to insert character codes
Дата
Msg-id 200305101620.24605.barwick@gmx.net
обсуждение исходный текст
Ответы Re: Using psql to insert character codes  (Randall Lucas <rlucas@tercent.net>)
Re: Using psql to insert character codes  (Ian Barwick <barwick@gmx.net>)
Re: Using psql to insert character codes  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-sql
Say using psql I wish to insert a character into a VARCHAR / TEXT / whatever
column using the its hexadecimal representation in the relevant character set
/ encoding. E.g.: C3A4, which represents the character 'ä' (lower case a with
umlaut) in UTF-8.

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?


Ian Barwick
barwick@gmx.net



В списке pgsql-sql по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: epoch to timestamp
Следующее
От: Randall Lucas
Дата:
Сообщение: Re: Using psql to insert character codes