From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Mark Lybarger <mlybarger@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: row_to_json white space
Date: Thu, 26 Sep 2019 11:49:10 -0700
Message-ID: <1a421353-66ef-018d-2f69-7b151ced5b82@aklaver.com> (raw)
In-Reply-To: <CAKM-gm+MJbLzgiZk-16ciCW+aLK35bpjyhuxT2wnSJWt9O5igw@mail.gmail.com>
References: <CAKM-gm+MJbLzgiZk-16ciCW+aLK35bpjyhuxT2wnSJWt9O5igw@mail.gmail.com>
On 9/26/19 10:54 AM, Mark Lybarger wrote:
> Hi,
>
> The row_to_json seems to strip white space:
>
> select ROW_to_json(q) from (select 'foo a bar' as TEST) q;
>
> any help on how to preserve?
Like Rob I do not see it:
test=# select version();
version
------------------------------------------------------------------------------------
PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (SUSE Linux)
4.8.5, 64-bit
(1 row)
test=# select ROW_to_json(q) from (select 'foo a bar' as TEST) q;
row_to_json
-------------------------------
{"test":"foo a bar"}
(1 row)
Do you possibly have an overloaded function of the same name(ROW_to_json())?
>
> Thanks!
> -mark-
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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-general@postgresql.org
Cc: adrian.klaver@aklaver.com, mlybarger@gmail.com
Subject: Re: row_to_json white space
In-Reply-To: <1a421353-66ef-018d-2f69-7b151ced5b82@aklaver.com>
References: <CAKM-gm+MJbLzgiZk-16ciCW+aLK35bpjyhuxT2wnSJWt9O5igw@mail.gmail.com> <1a421353-66ef-018d-2f69-7b151ced5b82@aklaver.com>
* 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