Re: WIP Patch: Add a function that returns binary JSONB as a bytea

From: Andres Freund <andres(at)anarazel(dot)de>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net>, kevinvan(at)shift(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP Patch: Add a function that returns binary JSONB as a bytea
Date: 2018-11-02 21:20:30
Message-ID: 20181102212030.rteayub2slrhruda@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2018-11-02 17:02:24 -0400, Andrew Dunstan wrote:
> On 11/02/2018 11:34 AM, Merlin Moncure wrote:
> >
> > Binary format consuming applications already have to deal with these
> > kinds of issues. We already expose internal structures in the other
> > functions -- not sure why jsonb is held to a different standard. For
> > other data types where format changes were made, the standard of
> > 'caveat version' was in place to protect the user. For jsonb we
> > decided to implement a version flag within the type itself, which I
> > thought mistake at the time -- better to have a version header in the
> > COPY BINARY if needed.
> >
>
>
> jsonb_send does output a version header, as I pointed out upthread.

That's Merlin's point I think. For reasons I don't quite understand he
doesn't like that. Yes, a global solution would have been prettier than
per-datum version flag, but that obvioulsy wasn't realistic to introduce
around the feature freeze of the version that introduced jsonb.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2018-11-02 22:15:25 Re: WIP Patch: Add a function that returns binary JSONB as a bytea
Previous Message Andres Freund 2018-11-02 21:18:16 Re: WIP Patch: Add a function that returns binary JSONB as a bytea