Re: Returning JSON or JSONB

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: Returning JSON or JSONB
Дата
Msg-id CALd+dcdz+ycrXrAik0kn40BOCZ0RXNx68FmB807_Tg1L+Vct0g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Returning JSON or JSONB  (Andreas Kretschmer <akretschmer@spamfence.net>)
Список pgsql-general

On Tue, Oct 20, 2015 at 4:04 AM, Andreas Kretschmer <akretschmer@spamfence.net> wrote:
If you are returning JSON, so is JSON the best choice.

The JSONB type represented as text (i.e., when you query it) is valid JSON. The same with JSON data type. The DB server renders the data as text when it sends it to you.

The choice should be made based on what you plant to do with the data in the database and if the properties of JSON are needed vs. the properties of JSONB (specifically duplicate key names and ordering of keys) or if it is not manipulated in the DB ever, then plain text is reasonable too.

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

Предыдущее
От: Vladimir Sitnikov
Дата:
Сообщение: Configurable length of application_name and/or read access to custom gucs of another backend
Следующее
От: Dane Foster
Дата:
Сообщение: Re: My first PL/pgSQL function