Re: Jsonb gets extra quotes when returned from a function that break json format

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Jakub Palenik <jakub(dot)palenik(at)biosort(dot)no>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Jsonb gets extra quotes when returned from a function that break json format
Date: 2021-05-19 16:31:07
Message-ID: CAKFQuwY4KtiCrFK5C3uWedpqZ_VnjSXLYfBaVOVoR+wqie2aPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, May 19, 2021 at 8:04 AM Jakub Palenik <jakub(dot)palenik(at)biosort(dot)no>
wrote:

> Greetings,
> I am using postgres database running within docker v13.3 (latest). I have
> found an issue where jsonb and timestamp type returned from function saved
> in the db assumes extra quotes and thus break json format.
>

You are printing a tuple which has a json column. The tuple has its own
escaping/quoting rules as does json. You are seeing the combination of
both.

You cannot do anything with the json value unless you first extract it from
the tuple so while I get the confusion about the visual and you
experiencing any actual issues because of this?

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2021-05-19 18:06:57 Re: Jsonb gets extra quotes when returned from a function that break json format
Previous Message PG Bug reporting form 2021-05-19 16:18:39 BUG #17028: Publish PGP Keys on 3rd party domains (enable out-of-band verifications)