Re: [GENERAL] Returning JSON or JSONB

2015-10-20 Thread Vick Khera
On Tue, Oct 20, 2015 at 4:04 AM, Andreas Kretschmer < akretsch...@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

Re: [GENERAL] Returning JSON or JSONB

2015-10-20 Thread Andreas Kretschmer
Dane Foster wrote: > 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? JSONB is only for internal storage, for external representati

[GENERAL] Returning JSON or JSONB

2015-10-19 Thread Dane Foster
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