JSONB text extraction of data containing tab character fails

Поиск
Список
Период
Сортировка
От DEVOPS, Dos (NHS ENGLAND - X26)
Тема JSONB text extraction of data containing tab character fails
Дата
Msg-id CWXP265MB1879A30E1D05FCC9113FA3B593562@CWXP265MB1879.GBRP265.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответы RE: JSONB text extraction of data containing tab character fails  ("Wetmore, Matthew (CTR)" <Matthew.Wetmore@express-scripts.com>)
Список pgsql-bugs
Relevant table and column structure

cgsh
=====
id (int)
data (varchar) --contains json data

Relevant data in the table

{code}
1, {"name":"item1","element":"record with a tab char\t"}
{/code}

Query

{code}
select id, data::jsonb->>'element' from cgsh
{/code}

Expected behaviour

Return
{code}
1, record with a tab char\t
{/code}

Actual behaviour

Return
{code}
SQL Error [22P02]: ERROR: invalid input syntax for type json
  Detail: Character with value 0x09 must be escaped.
  Where: JSON data, line 1: ...
{/code}



************************************************************************************** ******************************

This message may contain confidential information. If you are not the intended recipient please:
i) inform the sender that you have received the message in error before deleting it; and
ii) do not disclose, copy or distribute information in this e-mail or take any action in relation to its content (to do so is strictly prohibited and may be unlawful).
Thank you for your co-operation.

NHSmail is the secure email, collaboration and directory service available for all NHS staff in England. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.

For more information and to find out how you can switch visit Joining NHSmail – NHSmail Support

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18359: autovacuum stopped vacuuming user tables, focusing on just pg_auth_members repeatedly
Следующее
От: "Wetmore, Matthew (CTR)"
Дата:
Сообщение: RE: JSONB text extraction of data containing tab character fails