Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWODu-0008K0-Rj for pgsql-bugs@arkaria.postgresql.org; Sat, 15 Jul 2017 14:39:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dWODu-0005FO-BL for pgsql-bugs@arkaria.postgresql.org; Sat, 15 Jul 2017 14:39:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dWODt-0005F7-QF for pgsql-bugs@postgresql.org; Sat, 15 Jul 2017 14:39:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dWODq-000890-TY for pgsql-bugs@postgresql.org; Sat, 15 Jul 2017 14:39:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v6FEd4Fw010733; Sat, 15 Jul 2017 10:39:04 -0400 From: Tom Lane To: Martin Jonsson cc: pgsql-bugs@postgresql.org Subject: Re: function jsonb_pretty only outputs first character of result In-reply-to: <1519203186.1262505.1500125561024@mail.yahoo.com> References: <1519203186.1262505.1500125561024.ref@mail.yahoo.com> <1519203186.1262505.1500125561024@mail.yahoo.com> Comments: In-reply-to Martin Jonsson message dated "Sat, 15 Jul 2017 13:32:40 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10731.1500129544.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 15 Jul 2017 10:39:04 -0400 Message-ID: <10732.1500129544@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Martin Jonsson writes: > On postgres 9.6.3 (current ubuntu release) using the jsonb_pretty functio= n as in the documentation: > "select jsonb_pretty('[{"f1":1,"f2":null},2,null,3]')" does only give out= put "[". it seems the function only outputs the first character. Hm, I get: regression=3D# select jsonb_pretty('[{"f1":1,"f2":null},2,null,3]'); jsonb_pretty=20=20=20=20 -------------------- [ + { + "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 --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs