Re: How to call JSONB_INSERT with integer as the new to-be-inserted value?
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: How to call JSONB_INSERT with integer as the new to-be-inserted value? |
| Дата | |
| Msg-id | 663494.1599945984@sss.pgh.pa.us обсуждение |
| Ответ на | How to call JSONB_INSERT with integer as the new to-be-inserted value? (Alexander Farber <alexander.farber@gmail.com>) |
| Ответы |
Re: How to call JSONB_INSERT with integer as the new to-be-inserted value?
|
| Список | pgsql-general |
Alexander Farber <alexander.farber@gmail.com> writes:
> ERROR: function jsonb_insert(jsonb, unknown, integer) does not exist
> LINE 1: SELECT JSONB_INSERT(_user, '{uid}', _uid)
> ^
> HINT: No function matches the given name and argument types. You might
> need to add explicit type casts.
> QUERY: SELECT JSONB_INSERT(_user, '{uid}', _uid)
> CONTEXT: PL/pgSQL function words_get_user(jsonb) line 44 at assignment
I think it'd work to do
JSONB_INSERT(_user, '{uid}', to_jsonb(_uid));
The third argument has to be jsonb, not something else.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера