pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
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 Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: How about a psql backslash command to show GUCs?
Date: Sat, 9 Apr 2022 11:21:51 +0200
Message-ID: <YlFQLzlPi4QD0wSi@msg.df7cb.de> (raw)
In-Reply-To: <3400691.1649363759@sss.pgh.pa.us>
References: <CAApHDvoCyxBZqdvwc93cnsr_48zBY7wwYmZHhCjhgp-naiDKSA@mail.gmail.com>
	<995e06b1-0e50-396e-fce3-934d5e511e27@dunslane.net>
	<FF230C05-B27A-4C7B-8514-A5A21EA3D7CC@enterprisedb.com>
	<3370142.1649348973@sss.pgh.pa.us>
	<2DB6EB50-04DF-49D1-BB5B-61C62898BB35@enterprisedb.com>
	<3370992.1649349445@sss.pgh.pa.us>
	<711e43b9-6499-6a8b-0802-fb549874658e@joeconway.com>
	<CAKFQuwb6Ju1VM+hOV2hEbSzoW40o33qp12CQUGRhS+js=vYaew@mail.gmail.com>
	<CAFj8pRA2aEY+SRjZ_WurB8512Etry3Arefv_L7fkpHW-ct3kkQ@mail.gmail.com>
	<3400691.1649363759@sss.pgh.pa.us>

Re: Tom Lane
> Looks like the consensus has shifted to \dconfig.  I'll do it like that.

A bit late to the party, but two more ideas:


The name has evolved from \dcp over various longer \d-things to the
more verbose \dconfig. How about we evolve it even more and just call
it \config? That would be much easier to remember - in fact after I
seeing the patch the other day, I wanted to try it today and I was
confused when \config didn't work, and had to read the git log to see
how it's actually called.

It also doesn't conflict with tab completion too much, \conf<tab>
would work.


The other bit is hiding non-default values. "\dconfig" by itself is
very long and not very interesting. I have this in my .psqlrc that I
use very often on servers I'm visiting:

\set config 'SELECT name, current_setting(name), CASE source WHEN $$configuration file$$ THEN regexp_replace(sourcefile, $$^/.*/$$, $$$$)||$$:$$||sourceline ELSE source END FROM pg_settings WHERE source <> $$default$$;'

I would think that if \dconfig showed the non-default settings only,
it would be much more useful; the full list would still be available
with "\dconfig *". This is in line with \dt only showing tables on the
search_path, and "\dt *.*" showing all.

Christoph





view thread (71+ messages)  latest in thread

Message-ID: <YlFQLzlPi4QD0wSi@msg.df7cb.de>
Permalink:  ../YlFQLzlPi4QD0wSi@msg.df7cb.de/
Also on:    postgresql.org/message-id/YlFQLzlPi4QD0wSi@msg.df7cb.de

 · 

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: myon@debian.org, tgl@sss.pgh.pa.us, 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: <YlFQLzlPi4QD0wSi@msg.df7cb.de>
  References: <CAApHDvoCyxBZqdvwc93cnsr_48zBY7wwYmZHhCjhgp-naiDKSA@mail.gmail.com> <995e06b1-0e50-396e-fce3-934d5e511e27@dunslane.net> <FF230C05-B27A-4C7B-8514-A5A21EA3D7CC@enterprisedb.com> <3370142.1649348973@sss.pgh.pa.us> <2DB6EB50-04DF-49D1-BB5B-61C62898BB35@enterprisedb.com> <3370992.1649349445@sss.pgh.pa.us> <711e43b9-6499-6a8b-0802-fb549874658e@joeconway.com> <CAKFQuwb6Ju1VM+hOV2hEbSzoW40o33qp12CQUGRhS+js=vYaew@mail.gmail.com> <CAFj8pRA2aEY+SRjZ_WurB8512Etry3Arefv_L7fkpHW-ct3kkQ@mail.gmail.com> <3400691.1649363759@sss.pgh.pa.us> <YlFQLzlPi4QD0wSi@msg.df7cb.de>

* 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