Re: [PATCH] Generalized JSON output functions

From: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Ryan Pedela <rpedela(at)datalanche(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, hlinnaka <hlinnaka(at)iki(dot)fi>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: [PATCH] Generalized JSON output functions
Date: 2015-07-29 10:44:15
Message-ID: CACACo5QKOiZ-00Jf6W2Uf0Pst05qRekQ9UzssyBL0m9FGKdS2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shulgin, Oleksandr 2015-07-29 10:44:36 Re: deparsing utility commands
Previous Message Andres Freund 2015-07-29 10:43:53 Re: pg_basebackup and replication slots