varchar::bytea fails when varchar contains backslash

Поиск
Список
Период
Сортировка
От Matthias Apitz
Тема varchar::bytea fails when varchar contains backslash
Дата
Msg-id YhNYZ4qVmtjjxdti@c720-r368166
обсуждение исходный текст
Ответы Re: varchar::bytea fails when varchar contains backslash  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-general
Hello,

I wanted to look into a column of type varchar converting the content
with ::bytea to a hex string, but this fails when the column contains a
backslash:

psql -Usisis -dtestdb
psql (14.1)
Geben Sie »help« für Hilfe ein.

testdb=# select trenn from sik_fstab where name='EdvSelKenn';
             trenn
-------------------------------
 ; :,.-!@%&/()=?'*+#<>[\]{|}&"
 ; :,.-!@%&/()=?'*+#<>[\]{|}&"
(2 Zeilen)

testdb=# select trenn::bytea from sik_fstab where name='EdvSelKenn';
ERROR:  invalid input syntax for type bytea

Why is this?

    matthias
-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub



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

Предыдущее
От: Daevor The Devoted
Дата:
Сообщение: Re: 20220221-Clarification regarding PostgeSQL DB backup
Следующее
От: Tomas Pospisek
Дата:
Сообщение: Re: Detecting schema changes via WAL logs