| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Martin Jonsson <martinerikjonsson(at)yahoo(dot)fr> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: function jsonb_pretty only outputs first character of result |
| Date: | 2017-07-15 14:39:04 |
| Message-ID: | 10732.1500129544@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Martin Jonsson <martinerikjonsson(at)yahoo(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | 007reader | 2017-07-16 18:10:04 | BUG #14745: to_tsvector(regconfig, json[b]) is NOT immutable |
| Previous Message | Martin Jonsson | 2017-07-15 13:32:40 | function jsonb_pretty only outputs first character of result |