On Mon, Jun 19, 2017 at 2:25 PM, Peter Eisentraut <peter.eisentr...@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. -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers