pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Martin Jonsson <martinerikjonsson@yahoo.fr>
Cc: pgsql-bugs@postgresql.org
Subject: Re: function jsonb_pretty only outputs first character of result
Date: Sat, 15 Jul 2017 10:39:04 -0400
Message-ID: <10732.1500129544@sss.pgh.pa.us> (raw)
In-Reply-To: <1519203186.1262505.1500125561024@mail.yahoo.com>
References: <1519203186.1262505.1500125561024.ref@mail.yahoo.com>
	<1519203186.1262505.1500125561024@mail.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Martin Jonsson <martinerikjonsson@yahoo.fr> writes:
> On postgres 9.6.3 (current ubuntu release) using the jsonb_pretty function as in the documentation:
> "select jsonb_pretty('[{"f1":1,"f2":null},2,null,3]')" does only give output "[". it seems the function only outputs the first character.


Hm, I get:

regression=# select jsonb_pretty('[{"f1":1,"f2":null},2,null,3]');
    jsonb_pretty    
--------------------
 [                 +
     {             +
         "f1": 1,  +
         "f2": null+
     },            +
     2,            +
     null,         +
     3             +
 ]
(1 row)

Perhaps you were testing it with something that only showed you the first
line of the result text?

			regards, tom lane


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



view thread (2+ messages)

Message-ID: <10732.1500129544@sss.pgh.pa.us>
Permalink:  ../10732.1500129544@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10732.1500129544@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, martinerikjonsson@yahoo.fr
  Subject: Re: function jsonb_pretty only outputs first character of result
  In-Reply-To: <10732.1500129544@sss.pgh.pa.us>
  References: <1519203186.1262505.1500125561024.ref@mail.yahoo.com> <1519203186.1262505.1500125561024@mail.yahoo.com> <10732.1500129544@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox