pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Jonathan S. Katz <jkatz@postgresql.org>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Christoph Berg <myon@debian.org>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Mark Dilger <mark.dilger@enterprisedb.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: How about a psql backslash command to show GUCs?
Date: Mon, 06 Jun 2022 17:01:48 -0400
Message-ID: <952350.1654549308@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZQUHhhrw8ZHAaM0jKdpx+5OP7b3pLwNEFDbk5C0VVpuQ@mail.gmail.com>
References: <4105551.1649514677@sss.pgh.pa.us>
	<YlGtICTMIJ886Ij3@jrouhaud>
	<afad841b-cc31-1784-84f7-b6c3c71d0c5d@postgresql.org>
	<4115803.1649521632@sss.pgh.pa.us>
	<043bcb40-052f-5c85-63ff-d6a2b5a0b7ca@postgresql.org>
	<495595.1649704355@sss.pgh.pa.us>
	<9439380b-a81f-c910-f527-db4d470b026b@postgresql.org>
	<531275.1649707882@sss.pgh.pa.us>
	<7bba5a32-65fe-04e1-7c36-efd963a625c9@postgresql.org>
	<807242.1649776780@sss.pgh.pa.us>
	<20220606135529.GV29853@telsasoft.com>
	<918042.1654531335@sss.pgh.pa.us>
	<CA+TgmoZQUHhhrw8ZHAaM0jKdpx+5OP7b3pLwNEFDbk5C0VVpuQ@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> I think part of the problem here, though, is that one can imagine a
> variety of charters that might be useful. A user could want to see the
> parameters that have values in their session that differ from the
> system defaults, or parameters that have values which differ from the
> compiled-in defaults, or parameters that can be changed without a
> restart, or all the pre-computed parameters, or all the parameters
> that contain "vacuum" in the name, or all the query-planner-related
> parameters, or all the parameters on which any privileges have been
> granted. And it's just a judgement call which of those things we ought
> to try to accommodate in the psql syntax and which ones ought to be
> done by writing an ad-hoc query against pg_settings.

Sure.  Nonetheless, having decided to introduce this command, we have
to make that judgement call.

psql-ref.sgml currently explains that

        If <replaceable class="parameter">pattern</replaceable> is specified,
        only parameters whose names match the pattern are listed.  Without
        a <replaceable class="parameter">pattern</replaceable>, only
        parameters that are set to non-default values are listed.
        (Use <literal>\dconfig *</literal> to see all parameters.)

so we have the "all of them" and "ones whose names match a pattern"
cases covered.  And the definition of the default behavior as
"only ones that are set to non-default values" seems reasonable enough,
but the question is what counts as a "non-default value", or for that
matter what counts as "setting".

I think a reasonable case can be made for excluding "internal" GUCs
on the grounds that (a) they cannot be set, and therefore (b) whatever
value they have might as well be considered the default.

			regards, tom lane





view thread (71+ messages)  latest in thread

Message-ID: <952350.1654549308@sss.pgh.pa.us>
Permalink:  ../952350.1654549308@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/952350.1654549308@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pryzby@telsasoft.com, jkatz@postgresql.org, rjuju123@gmail.com, myon@debian.org, pavel.stehule@gmail.com, david.g.johnston@gmail.com, mail@joeconway.com, mark.dilger@enterprisedb.com, andrew@dunslane.net, dgrowleyml@gmail.com, alvherre@alvh.no-ip.org
  Subject: Re: How about a psql backslash command to show GUCs?
  In-Reply-To: <952350.1654549308@sss.pgh.pa.us>
  References: <4105551.1649514677@sss.pgh.pa.us> <YlGtICTMIJ886Ij3@jrouhaud> <afad841b-cc31-1784-84f7-b6c3c71d0c5d@postgresql.org> <4115803.1649521632@sss.pgh.pa.us> <043bcb40-052f-5c85-63ff-d6a2b5a0b7ca@postgresql.org> <495595.1649704355@sss.pgh.pa.us> <9439380b-a81f-c910-f527-db4d470b026b@postgresql.org> <531275.1649707882@sss.pgh.pa.us> <7bba5a32-65fe-04e1-7c36-efd963a625c9@postgresql.org> <807242.1649776780@sss.pgh.pa.us> <20220606135529.GV29853@telsasoft.com> <918042.1654531335@sss.pgh.pa.us> <CA+TgmoZQUHhhrw8ZHAaM0jKdpx+5OP7b3pLwNEFDbk5C0VVpuQ@mail.gmail.com> <952350.1654549308@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox