Re: [PATCH] Generalized JSON output functions - Mailing list pgsql-hackers

From Shulgin, Oleksandr
Subject Re: [PATCH] Generalized JSON output functions
Date
Msg-id CACACo5QKOiZ-00Jf6W2Uf0Pst05qRekQ9UzssyBL0m9FGKdS2Q@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Generalized JSON output functions  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On July 13 I wrote:

Yes, but I think the plugin is the right place to do it. What is more, this won't actually prevent you completely from producing non-ECMAScript compliant JSON, since json or jsonb values containing offending numerics won't be caught, AIUI. But a fairly simple to write function that reparsed and fixed the JSON inside the decoder would work.

The OP admitted that this was a serious flaw in his approach. In fact, given that a json value can contain an offending numeric value, any approach which doesn't involve reparsing is pretty much bound to fail.

I agree that was a critical omission in my thinking.

Now, back to the whitespace issue: I could submit a patch to unify the whitespace w/o all the hairy callbacks.  Did we have the consensus here: no spaces whatsoever unless some *_pretty function is used?

--
Alex

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_basebackup and replication slots
Next
From: "Shulgin, Oleksandr"
Date:
Subject: Re: deparsing utility commands