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

From Peter Eisentraut
Subject Re: default result formats setting
Date
Msg-id ba30c268-e841-4817-0c67-06417b67858c@2ndquadrant.com
Whole thread Raw
In response to Re: default result formats setting  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: default result formats setting  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: default result formats setting  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2020-10-26 09:45, Pavel Stehule wrote:
>     The attached patch implements this.  For example, to get int2, int4,
>     int8 in binary by default, you could set
> 
>     SET default_result_formats = '21=1,23=1,20=1';
> 
> 
> Using SET statement for this case looks very obscure :/
> 
> This is a protocol related issue, and should be solved by protocol 
> extending. I don't think so SQL level is good for that.

We could also make it a protocol message, but it would essentially 
implement the same thing, just again separately.  And then you'd have no 
support to inspect the current setting, test out different settings 
interactively, etc.  That seems pretty wasteful and complicated for no 
real gain.

 > More, this format is not practical for custom types, and the list can
 > be pretty long.

The list is what the list is.  I don't see how you can make it any 
shorter.  You have to list the data types that you're interested in 
somehow.  Any other ideas?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: list_free() in index_get_partition()
Next
From: Peter Eisentraut
Date:
Subject: Re: default result formats setting