Re: default result formats setting

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: default result formats setting
Date: 2020-11-25 07:06:57
Message-ID: a682b639-d223-30fa-e836-fd5f14f7815a@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-11-16 16:15, Andrew Dunstan wrote:
> I think this is conceptually OK, although it feels a bit odd.
>
> Might it be better to have the values as typename={binary,text} pairs
> instead of oid={0,1} pairs, which are fairly opaque? That might make
> things easier for things like UDTs where the oid might not be known or
> constant.

Yes, type names would be better. I was hesitant because of all the
parsing work involved, but I bit the bullet and did it in the new patch.

To simplify the format, I changed the parameter so it's just a list of
types that you want in binary, rather than type=value pairs. If we ever
want to add another format, we would revisit this, but it seems unlikely
in the near future.

Also, I have changed the naming of the parameter since this is no longer
the "default" but something you choose explicitly. I'm thinking in the
direction of "auto" mode for the naming. Obviously, the name is easy to
tweak in any case.

--
Peter Eisentraut
2ndQuadrant, an EDB company
https://www.2ndquadrant.com/

Attachment Content-Type Size
v3-0001-Add-result_format_auto_binary_types-setting.patch text/plain 15.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-11-25 07:12:15 Re: vac_update_datfrozenxid will raise "wrong tuple length" if pg_database tuple contains toast attribute.
Previous Message Greg Nancarrow 2020-11-25 07:04:11 Re: Libpq support to connect to standby server as priority