pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
suggestion: psql configs in .config
5+ messages / 4 participants
[nested] [flat]

* suggestion: psql configs in .config
@ 2020-06-11 20:28  Caleb Cushing <xenoterracide@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Caleb Cushing @ 2020-06-11 20:28 UTC (permalink / raw)
  To: pgsql-general

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

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: suggestion: psql configs in .config
@ 2020-06-11 20:33  David G. Johnston <david.g.johnston@gmail.com>
  parent: Caleb Cushing <xenoterracide@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: David G. Johnston @ 2020-06-11 20:33 UTC (permalink / raw)
  To: Caleb Cushing <xenoterracide@gmail.com>; +Cc: pgsql-general

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.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: suggestion: psql configs in .config
@ 2020-06-11 21:07  Caleb Cushing <xenoterracide@gmail.com>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Caleb Cushing @ 2020-06-11 21:07 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-general

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

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: suggestion: psql configs in .config
@ 2020-06-11 21:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Caleb Cushing <xenoterracide@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Tom Lane @ 2020-06-11 21:55 UTC (permalink / raw)
  To: Caleb Cushing <xenoterracide@gmail.com>; +Cc: pgsql-general

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





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: suggestion: psql configs in .config
@ 2020-06-11 23:20  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Alvaro Herrera @ 2020-06-11 23:20 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Caleb Cushing <xenoterracide@gmail.com>; pgsql-general

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





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2020-06-11 23:20 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 20:28 suggestion: psql configs in .config Caleb Cushing <xenoterracide@gmail.com>
2020-06-11 20:33 ` David G. Johnston <david.g.johnston@gmail.com>
2020-06-11 21:07   ` Caleb Cushing <xenoterracide@gmail.com>
2020-06-11 21:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-06-11 23:20   ` Alvaro Herrera <alvherre@2ndquadrant.com>

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