Re: [HACKERS] psql's \d and \dt are sending their complaints todifferent output files

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [HACKERS] psql's \d and \dt are sending their complaints todifferent output files
Дата
Msg-id CAKFQuwYNyqnxse+B2WGTBC8xTSsFaMxZkAT+bHOr1c0ihM4q6w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] psql's \d and \dt are sending their complaints todifferent output files  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] psql's \d and \dt are sending their complaints to different output files  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Jun 19, 2017 at 2:25 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 6/19/17 09:00, Oleksandr Shulgin wrote:
>> I wonder if it is intentional that \d complains on stderr if it cannot
>> find relations to match, but \dt prints the message to the current
>> output file?
>>
>> postgres=# \d xxx
>> Did not find any relation named "xxx".
>> postgres=# \dt xxx
>> No matching relations found.
>>>
> The first command is "show me relation xxx" and that gives an error
> message if it does not exist (and would also create an appropriate exit
> status if certain options are used).
>
> The second command says "show me all relations matched 'xxx'".  The
> result of this is successful execution showing nothing.  The message it
> prints is a "courtesy" message.

The docs indicate the optional argument to both is a pattern so I'm
not seeing why they are treated differently.

The docs also indicate that we don't include materialized views as
part of "\d" which seems like an oversight somewhere.

It sounds like, though isn't specified anywhere, the while you can
write "\dit" to get a subset of all available options omitting all of
the options leaves you with "\d" which is equivalent to specifying
them all.  Which leads on to believe the output from both should be in
sync.

David J.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] psql's \d and \dt are sending their complaints to different output files
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] psql's \d and \dt are sending their complaints to different output files