Re: How about a psql backslash command to show GUCs? - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: How about a psql backslash command to show GUCs?
Date
Msg-id YlFQLzlPi4QD0wSi@msg.df7cb.de
Whole thread Raw
In response to Re: How about a psql backslash command to show GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How about a psql backslash command to show GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: How to simulate sync/async standbys being closer/farther (network distance) to primary in core postgres?
Next
From: Alvaro Herrera
Date:
Subject: Re: Mingw task for Cirrus CI