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

From Tom Lane
Subject Re: FWD: Re: Updated backslash consistency patch
Date
Msg-id 10700.1232136103@sss.pgh.pa.us
Whole thread Raw
In response to Re: FWD: Re: Updated backslash consistency patch  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> Tom,
>> 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.

> Just because they haven't voiced loud complaints doesn't mean that they 
> haven't been *confused* by it.  I know that I've been confused by the 
> behaviour of \d before, which is why I pretty much never use it.

> I think a search of -general and -newbie would be educational on the 
> number of people who are confused by the shortcuts.

> Or, to put it another way, the fact that we screwed up in the past is 
> hardly a justification to do it in the future.

Well, the only reason for proposing the special case for no-pattern
was to provide some modicum of backward compatibility for \d and \dt.
If we want to decide that those are screwed up anyway and we should
make them work more like the other ones, that'd be okay with me.
But I have gotten the clear impression that such a proposal isn't
going to get majority support.

I think though that your confusion may come from an aspect of \d's
behavior that is more or less orthogonal to what we've been discussing:
without a pattern it equates to \dtvs, that is you get a summary
one-line-per-relation display of tables, views, and sequences; whereas
with a pattern it does something entirely different, to wit you get a
verbose display about each matching relation.  Maybe we should
reconsider that bit; but it's a different argument from the one about
system vs user objects.

[ thinks a bit... ]  One interesting idea is to go with the all/S/U
behavior for \dt, but to define bare "\d" as meaning "\dtvsU" not
just "\dtvs".  That keeps backwards compatibility for that specific
case without introducing any conceptual inconsistency into the rest of
the command set.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: FWD: Re: Updated backslash consistency patch
Next
From: Robert Haas
Date:
Subject: Re: FWD: Re: Updated backslash consistency patch