Re: FWD: Re: Updated backslash consistency patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: "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-15 19:38:16
Message-ID: 10245.1232048296@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Robert Haas" <robertmhaas(at)gmail(dot)com> writes:
>> However, having said that, I'm not averse to unifying the behavior
>> as long as it's done in a sensible fashion. Imposing the old behavior
>> of \dt on everything else is simply not that sensible fashion.

> Do you have another proposal?

> Although I agree with you that there's more of a case for a user
> wanting looking for system functions/operators than there is for
> looking for system tables, I think it's important that there is some
> EASY way to get only user functions, or only system functions, when
> that's what you want.

Well, as I said before, I'm not averse to having the default behavior
*with no pattern* to be that we omit system objects --- and I think we
could make that apply across the board. What I'm saying is that when
you give a pattern it should not matter whether an object is system or
user. It would go like this:

\df -- all non-system functions
\df sin -- the active (visible) definition of sin()
\df sin* -- all visible functions starting with "sin"

lesser used cases:

\df * -- all visible functions
\df *.* -- all functions, period
\df pg_catalog.* -- all system functions
\df public.* -- all functions in public

Now admittedly, if your user functions are scattered across multiple
schemas this doesn't provide any easy way to say "all functions starting
with "sin" that are *not* system functions", but I don't see that that
is such an important use-case that it trumps usability for every other
purpose. If you're naming your functions in a way that conflicts with
system functions, you're going to have other problems (and a \df acting
as HEAD does would actually get in the way of you discovering what the
root of the problem is).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2009-01-15 19:44:32 Re: Updated backslash consistency patch
Previous Message David Fetter 2009-01-15 19:26:28 Re: FWD: Re: Updated backslash consistency patch