Re: default result formats setting

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: default result formats setting
Date: 2020-11-05 20:48:55
Message-ID: ba30c268-e841-4817-0c67-06417b67858c@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-11-05 21:03:29 Re: default result formats setting
Previous Message Justin Pryzby 2020-11-05 20:36:06 list_free() in index_get_partition()