Обсуждение: decode/encode backslash to base64

Поиск
Список
Период
Сортировка

decode/encode backslash to base64

От
ft
Дата:
Hello,

here is an example for decode and encode
a string with backslash: 'a\'

select trim(convert_from(decode('YVw=', 'base64'), 'UTF8') )::text;
answer: 'a\'

the next query throw an error: 
SQL Error [22P02]: ERROR: invalid input syntax for type bytea

select encode(trim(convert_from(decode('YVw=', 'base64'), 'UTF8')
)::text::bytea, 'base64' );

also:
select encode('a\'::text::bytea, 'base64');

What should I do?

Franz