Обсуждение: suggestion: psql configs in .config

Поиск
Список
Период
Сортировка

suggestion: psql configs in .config

От
Caleb Cushing
Дата:
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
--

Re: suggestion: psql configs in .config

От
"David G. Johnston"
Дата:
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.

Re: suggestion: psql configs in .config

От
Caleb Cushing
Дата:
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.



--

Re: suggestion: psql configs in .config

От
Tom Lane
Дата:
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



Re: suggestion: psql configs in .config

От
Alvaro Herrera
Дата:
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