Re: default result formats setting

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: default result formats setting
Date: 2020-11-16 15:15:25
Message-ID: b2eadee1-321f-c18b-e277-086eced5ee71@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 11/9/20 5:10 AM, Peter Eisentraut wrote:
> On 2020-11-05 22:03, Peter Eisentraut wrote:
>>> Independently of that, how would you implement "says otherwise" here,
>>> ie do a single-query override of the session's prevailing setting?
>>> Maybe the right thing for that is to define -1 all the way down to the
>>> protocol level as meaning "use the session's per-type default", and
>>> then if you don't want that you can pass 0 or 1.  An advantage of that
>>> is that you couldn't accidentally break an application that wasn't
>>> ready for this feature, because it would not be the default to use it.
>> Yeah, that sounds a lot better.  I'll look into that.
>
> Here is a new patch updated to work that way.  Feels better now.
>

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.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2020-11-16 15:26:37 Re: Add important info about ANALYZE after create Functional Index
Previous Message Tom Lane 2020-11-16 15:06:00 Re: Move OpenSSL random under USE_OPENSSL_RANDOM