Jsonb gets extra quotes when returned from a function that break json format

Поиск
Список
Период
Сортировка
От Jakub Palenik
Тема Jsonb gets extra quotes when returned from a function that break json format
Дата
Msg-id PR3PR01MB678048B55E8C15D417746A62862B9@PR3PR01MB6780.eurprd01.prod.exchangelabs.com
обсуждение исходный текст
Ответы Re: Jsonb gets extra quotes when returned from a function that break json format  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Jsonb gets extra quotes when returned from a function that break json format  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-bugs
Greetings,
I am using postgres database running within docker v13.3 (latest). I have found an issue where jsonb and timestamp type returned from function saved in the db assumes extra quotes and thus break json format.

I have a table that has a column of jsonb type.


when I query this table json be is returned correctly (as stored).


When I use this querry within a function, the jsonb column is modified such that every value in the json tree assumes extra quotes:

For information completness sake, this only happens if there is other than jsonb type in thre returns table statement:

Timestamp also gets extra quotes when included in the return table statement (I have demostrated the case above with minimal example. Following snippet is result of actual function that I use):

Best regards,
Jakub

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17020: meta command psql _eset does not clear the query buffer
Следующее
От: Palle
Дата:
Сообщение: Re: BUG #16696: Backend crash in llvmjit