Returning JSON or JSONB

From: Dane Foster <studdugie(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Returning JSON or JSONB
Date: 2015-10-20 02:23:23
Message-ID: CA+WxinJCCwJ6b1C=6xYkGtaDfUnRk6wmn9TTYsJV6zYN++xLZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I was wondering when returning JSON data from a PostgreSQL function for
consumption by clients (e.g., PHP or Lua) does it make any difference to
declare the function's return type as JSON or JSONB?

Now that I've actually written the question down it occurs to me that what
I really want to know is which data type (JSON or JSONB or maybe TEXT) has
the lowest overhead in terms of transformation and transmission at the
PostgreSQL protocol level.

Thanks,

Dane

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josip Rodin 2015-10-20 07:22:27 Re: ERROR: tablespace "archive2" is not empty
Previous Message Scott Mead 2015-10-19 22:26:35 Re: [BUGS] postgresql table data control