Re: JSON_VALUE() behavior when RETURNING bytea (expected base64 decoding)

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: JSON_VALUE() behavior when RETURNING bytea (expected base64 decoding)
Дата
Msg-id CAKAnmmLPhU=fucw8B-TUs44+64R17LZ1eDN8qKORR+dTJVj77w@mail.gmail.com
обсуждение исходный текст
Ответ на JSON_VALUE() behavior when RETURNING bytea (expected base64 decoding)  (Shay Rojansky <roji@roji.org>)
Список pgsql-hackers
It looks like your bytea_output is set to 'escape', which would explain what you are seeing. Try adding this in first:

SET bytea_output = hex;
SELECT JSON_VALUE(jsonb '"AQID"', '$' RETURNING bytea);

That (hex) is the default value, so you must be setting it to escape somewhere. You can see where by running:

select * from pg_settings where name = 'bytea_output';

Examine the source, sourcefile, and sourceline columns 

I personally prefer hex, but perhaps it's set to octet in your system for a reason. If not, maybe change it globally?

Cheers,
Greg

--
Enterprise Postgres Software Products & Tech Support

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