option for psql - short list non template database
option for psql - short list non template database
От:
Pavel Stehule <pavel.stehule@gmail.com>
Дата:
Hi
terrible often I use patternRe: option for psql - short list non template database
От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Thu, Jul 16, 2015 at 12:21 AM, Pavel Stehule wrote: > terrible often I use pattern > > psql -c "select datname from pg_database where not datistemplate and > datallowconn" postgres > > What about introduction new long option that does it? > > psql -At -list --names --without-templates I think you should just put an alias in your .bashrc file. If we add everyone's favorite shortcuts to every tool, we will end up with an unsupportable number of features that are each of interest to only a very few people. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Re: option for psql - short list non template database
От:
Pavel Stehule <pavel.stehule@gmail.com>
Дата:
2015-07-17 18:56 GMT+02:00 Robert Haas <robertmhaas@gmail.com>:
On Thu, Jul 16, 2015 at 12:21 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> terrible often I use pattern
>
> psql -c "select datname from pg_database where not datistemplate and
> datallowconn" postgres
>
> What about introduction new long option that does it?
>
> psql -At -list --names --without-templates
I think you should just put an alias in your .bashrc file. If we add
everyone's favorite shortcuts to every tool, we will end up with an
unsupportable number of features that are each of interest to only a
very few people.
sure - but taking list of databases and iteration over this list is pretty common task.
Pavel
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company