Re: FWD: Re: Updated backslash consistency patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Brendan Jurd" <direvus(at)gmail(dot)com>, "Greg Sabino Mullane" <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: FWD: Re: Updated backslash consistency patch
Date: 2009-01-16 16:36:45
Message-ID: 7317.1232123805@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> So it seems to me that we made \df consistent with \dt when in fact what we
> really wanted is for it to be consistent with \d. I hadn't actually realized
> that the behaviour for \d was so different from \dt myself.

Yeah, given that the battle cry for this patch was "let's make
everything consistent", it seems like some attention should be paid to
that.

I think that when everybody got tired of arguing yesterday, the last
idea left standing was

* revert \df to its former behavior, ie doesn't care if
functions are system or user
* \dfS will restrict the printout to system functions
* \dfU will restrict the printout to non-system functions

where "system function" means "it's in the pg_catalog schema".
(Presumably this means that "\dfS public.*" fails to print anything ...
is that okay?)

I suggest that we make all the \d commands work like that, including
\d and \dt.

One issue here is that plain \d gets less useful because it'll now
include system catalogs. We could add the additional rule that
the above statements apply only when a pattern is specified, and
without a pattern you get just user stuff (so omitting a pattern
corresponds to pattern "*" with the U modifier, not just "*").
This would probably make it a bit easier to have exactly the same
rules across the board.

Again, "\dfS" would be a bit useless, unless we say that the implicit
U modifier for no pattern doesn't override an explicit S modifier.

Comments? Does this cover all the cases?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-01-16 16:37:14 Re: SnapshotResetXmin
Previous Message Simon Riggs 2009-01-16 16:22:09 SnapshotResetXmin