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: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, hlinnaka <hlinnaka(at)iki(dot)fi>, Ryan Pedela <rpedela(at)datalanche(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: [PATCH] Generalized JSON output functions
Date: 2015-07-17 14:40:39
Message-ID: CACACo5RkzKPowVhA3bhueza+=izmPWNyOAtfwzZ=akkxhZBmSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 17, 2015 4:31 PM, "Andrew Dunstan" <andrew(at)dunslane(dot)net> wrote:
>
>
> On 07/17/2015 10:11 AM, Andrew Dunstan wrote:
>>
>>
>> On 07/17/2015 08:20 AM, Shulgin, Oleksandr wrote:
>>
>>
>>> > This patch makes Postgres core more complex
>>>
>>> Yes, it does. But, that was not the purpose, obviously. :-)
>>>
>>> > while not really solving the problem in Javascript.
>>>
>>> It still allows for less risk of silent data corruption on the js side.
>>>
>>>
>>
>> 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.
>
>
>
> Incidentally, this doesn't look acceptable anyway:
>>
>> !
es->json_cxt.value(&es->json_cxt, num, JSONTYPE_NUMERIC,
>> !
NUMERICOID, 1702 /* numeric_out */);
>
>
> We don't hardcode function oids elsewhere. So this is also something that
makes the patch unacceptable.

Well, good to know (I believe I've asked about this in the first mail
specifically).

Is there any way a built-in function oid would change/differ on different
server versions? What would be the recommended way to do this?

--
Alex

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc Mamin 2015-07-17 14:44:36 Re: proposal: multiple psql option -c
Previous Message Michael Paquier 2015-07-17 14:40:35 Re: [COMMITTERS] pgsql: Retain comments on indexes and constraints at ALTER TABLE ... TY