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 10245.1232048296@sss.pgh.pa.us
Whole thread Raw
In response to Re: FWD: Re: Updated backslash consistency patch  ("Robert Haas" <robertmhaas@gmail.com>)
Responses Re: FWD: Re: Updated backslash consistency patch
List pgsql-hackers
"Robert Haas" <robertmhaas@gmail.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


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: FWD: Re: Updated backslash consistency patch
Next
From: David Fetter
Date:
Subject: Re: Updated backslash consistency patch