Re: Consistent \d commands in psql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Consistent \d commands in psql
Дата
Msg-id 26496.1206901955@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Consistent \d commands in psql  (Greg Sabino Mullane <greg@turnstep.com>)
Ответы Re: Consistent \d commands in psql  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-patches
Greg Sabino Mullane <greg@turnstep.com> writes:
> Attached is an updated version of my psql patch that makes the \d
> backslash commands perform in an intuitive, consistent way.
> Specifically, the following objects will be treated as first class
> citizens (as tables and indexes currently are) by showing all the
> non-system objects by default and requiring a "S" to see the system
> ones.

> aggregates
> conversions
> comments
> domains
> operators
> functions
> types

> Currently, there is no way to view all the non-system functions in a
> database using backslash commands, as you can with \dt, unless all of
> the functions happen to be in a single schema ("\df myschema."). With
> this patch, it would be as simple as "\df", and the current behavior
> would be done with "\dfS".

Hmm.  Personally, most of my uses of \df are for the purpose of looking
for built-in functions, and so this'd be a step backwards for my usage.
Likewise for operators.  Maybe I'm in the minority or maybe not.
The only one of these things for which the argument seems entirely
compelling is comments.  I do understand the appeal of consistency but
sometimes it's not such a great thing.

Also, if we're going to try to enforce such a policy consistently,
shouldn't the text-search-related \d commands be changed likewise?

In any case, this patch fails to apply cleanly, and did even when it
was generated, because it contains merge conflict reports, eg

>                         "FROM pg_catalog.pg_proc p\n"
> + <<<<<<< describe.c
> +                       "JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
> + =======
>                         "     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
> + >>>>>>> 1.160
>                         "WHERE p.proisagg\n",

I'm not going to risk trying to decipher the intended changes from this.


            regards, tom lane

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Reference by output in : \d
Следующее
От: Tom Lane
Дата:
Сообщение: Re: psql slash# command