Re: FWD: Re: Updated backslash consistency patch - Mailing list pgsql-hackers

From Robert Haas
Subject Re: FWD: Re: Updated backslash consistency patch
Date
Msg-id 603c8f070901161203o1aef43bdheb837f45057f055@mail.gmail.com
Whole thread Raw
In response to Re: FWD: Re: Updated backslash consistency patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: FWD: Re: Updated backslash consistency patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Actually, now that I look at the code, the historical behavior of
> \d is even weirder than I thought:
>
>        \d or \d+ *with no pattern* is equivalent to \dtvs(+)
>                (and hence shows all user tables and no system tables)
>
>        \d or \d+ *with a pattern* takes a completely different
>                code path that has no system-vs-user special behavior,
>                ie it's about like the historical \df behavior
>
> which means that Robert's complaint about treating no-pattern
> differently from pattern falls to the ground.  It's exactly what
> \d has done for years, and nobody has complained about that.

Well, the behavior of \d with a pattern is almost totally useless
right now.  Probably no one is doing "\d a*" because it produces an
obscene amount of output (or if you don't have more than one table
with a, then pick some other letter).  On the other hand "\dt a*" does
something very nice that is just what you might expect.

But you're right: my facts were wrong with respect to treating
no-pattern differently than pattern.  I don't think that makes the
point invalid.  I can't shake the feeling that this is about a couple
of PostgreSQL hackers (yourself included) not wanting to type \dfS or
\dfA or something to get the behavior they currently get with \df.  If
that's the case, come off it, because there's lots of evidence on this
thread (and in all likelihood elsewhere) that this behavior is not
what end-users want.

Making \df only show user functions, and "\df <pattern>" only search
user functions, is going to make a LOT of people happy (perhaps after
5 minutes of initial confusion).  If it makes three developers
unhappy, it's worth it - especially because the developers can easily
add a switch, backslash command, environment variable setting, or
whatever they want to still be able to have it the way they like it.
By all means, add a setting that includes system stuff without having
to type an extra letter - just don't make it the default.

...Robert


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: FWD: Re: Updated backslash consistency patch
Next
From: Tom Lane
Date:
Subject: Re: FWD: Re: Updated backslash consistency patch