From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>, 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-17 16:46:15 |
Message-ID: | 55A93157.4060708@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 07/17/2015 10:30 AM, Alvaro Herrera wrote:
> Andrew Dunstan wrote:
>
>> I have already pointed out how this patch is fundamentally broken. You can
>> achieve your aims by a fairly small amount of code inside your logical
>> decoder, and with no core code changes whatsoever. So I'm puzzled why we are
>> even still debating this broken design.
> I went through all your responses over the entire thread and I couldn't
> find your argument about how this is fundamentally broken. Can you
> restate, or maybe give an archive link if I just missed it?
>
>
> (Saying "but it changes so much of the existing code" is not really a
> fundamental problem to me. I mean, it's not like the existing code is
> perfect and needs no changes.)
>
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.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-07-17 16:50:17 | Re: Transactions involving multiple postgres foreign servers |
Previous Message | Alvaro Herrera | 2015-07-17 15:15:46 | Re: [PATCH] Generalized JSON output functions |