From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Mark Lybarger <mlybarger@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: row_to_json white space
Date: Thu, 26 Sep 2019 12:02:31 -0700
Message-ID: <6ab6bf56-03fd-14e2-30f8-381248fb54d8@aklaver.com> (raw)
In-Reply-To: <CAKM-gmKoqvWPJchUrnc5u6rx0HBMjh5FtcSczWRsgKf6L=NYfg@mail.gmail.com>
References: <CAKM-gm+MJbLzgiZk-16ciCW+aLK35bpjyhuxT2wnSJWt9O5igw@mail.gmail.com>
<1a421353-66ef-018d-2f69-7b151ced5b82@aklaver.com>
<CAKM-gmKoqvWPJchUrnc5u6rx0HBMjh5FtcSczWRsgKf6L=NYfg@mail.gmail.com>
On 9/26/19 11:54 AM, Mark Lybarger wrote:
Ccing the list so folks know the problem is solved.
> Problem is on my end. My tool was showing the space removed and infact
> it wasn't. Copy paste from dbeaver to notepad++ shows the spaces are
> preserved.
>
> On Thu, Sep 26, 2019 at 2:49 PM Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
> 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 <mailto:adrian.klaver@aklaver.com>
>
--
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: <6ab6bf56-03fd-14e2-30f8-381248fb54d8@aklaver.com>
References: <CAKM-gm+MJbLzgiZk-16ciCW+aLK35bpjyhuxT2wnSJWt9O5igw@mail.gmail.com> <1a421353-66ef-018d-2f69-7b151ced5b82@aklaver.com> <CAKM-gmKoqvWPJchUrnc5u6rx0HBMjh5FtcSczWRsgKf6L=NYfg@mail.gmail.com> <6ab6bf56-03fd-14e2-30f8-381248fb54d8@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