Re: default result formats setting - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: default result formats setting
Date
Msg-id a682b639-d223-30fa-e836-fd5f14f7815a@2ndquadrant.com
Whole thread Raw
In response to Re: default result formats setting  (Andrew Dunstan <andrew@dunslane.net>)
List 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

pgsql-hackers by date:

Previous
From: Greg Nancarrow
Date:
Subject: Re: Libpq support to connect to standby server as priority
Next
From: Michael Paquier
Date:
Subject: Re: vac_update_datfrozenxid will raise "wrong tuple length" if pg_database tuple contains toast attribute.