Re: [GENERAL] jsonb

Поиск
Список
Период
Сортировка
От Johannes Graën
Тема Re: [GENERAL] jsonb
Дата
Msg-id 98fad95e-e731-cf0d-f4d3-3968a945c8a4@selfnet.de
обсуждение исходный текст
Ответ на [GENERAL] jsonb  (hmidi slim <hmidi.slim2@gmail.com>)
Список pgsql-general
On 11/14/2017 11:30 PM, hmidi slim wrote:
> I'm trying to use the function to_jsonb and create the name:
> to_jsonb ('{"key1":" ' || 'text1' || '","key2":" ' || 'text2' || '"}');

This query converts a string into a JSON object that consist of that
string. I guess what you intend to accomplish is rather:

select jsonb_build_object('key1', 'text1', 'key2', 'text2');




-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: [GENERAL] jsonb
Следующее
От: John R Pierce
Дата:
Сообщение: Re: [GENERAL] jsonb