suggestion: psql configs in .config

Started by Caleb Cushingalmost 6 years ago5 messagesgeneral
Jump to latest
#1Caleb Cushing
xenoterracide@gmail.com

would it be possible to allow psql config files to reside in ~/.config/psql
to help unclutter ~ obviously this should be some kind of cascading lookup

first look for... e.g
.config/psql/psqlrc
.psqlrc

or vice versa
--
Caleb Cushing

https://xenoterracide.com

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Caleb Cushing (#1)
Re: suggestion: psql configs in .config

On Thursday, June 11, 2020, Caleb Cushing <xenoterracide@gmail.com> wrote:

would it be possible to allow psql config files to reside in
~/.config/psql to help unclutter ~ obviously this should be some kind of
cascading lookup

first look for... e.g
.config/psql/psqlrc
.psqlrC

libpq consults environment variables to allow for user customization.

David J.

#3Caleb Cushing
xenoterracide@gmail.com
In reply to: David G. Johnston (#2)
Re: suggestion: psql configs in .config

Got it. but... I guess I'm hoping this could be added to the default lookup
path, no customization needed.

On Thu, Jun 11, 2020 at 3:33 PM David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Thursday, June 11, 2020, Caleb Cushing <xenoterracide@gmail.com> wrote:

would it be possible to allow psql config files to reside in
~/.config/psql to help unclutter ~ obviously this should be some kind of
cascading lookup

first look for... e.g
.config/psql/psqlrc
.psqlrC

libpq consults environment variables to allow for user customization.

David J.

--
Caleb Cushing

https://xenoterracide.com

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Caleb Cushing (#1)
Re: suggestion: psql configs in .config

Caleb Cushing <xenoterracide@gmail.com> writes:

would it be possible to allow psql config files to reside in ~/.config/psql
to help unclutter ~ obviously this should be some kind of cascading lookup
first look for... e.g
.config/psql/psqlrc
.psqlrc

I'm finding it hard to see a compelling reason why that would be an
improvement. It would make psql randomly different from 95% of the
other programs that have similar config files. Or, if everybody
somehow got on board with "let's put config files in ~/.config/",
then there'd be clutter in that directory ... and we're back to
square one.

Also, this is the kind of thing where version-to-version changes
in behavior will be REALLY user-unfriendly.

regards, tom lane

#5Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Tom Lane (#4)
Re: suggestion: psql configs in .config

On 2020-Jun-11, Tom Lane wrote:

I'm finding it hard to see a compelling reason why that would be an
improvement. It would make psql randomly different from 95% of the
other programs that have similar config files. Or, if everybody
somehow got on board with "let's put config files in ~/.config/",
then there'd be clutter in that directory ... and we're back to
square one.

Actually, they do: this has been kind-of standardized by freedesktop
as XDG_CONFIG_HOME -- see
https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html
My own ~/.config has 84 subdirs and files.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services