Re: FWD: Re: Updated backslash consistency patch

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 15:52:22
Message-ID: 87iqofdz9l.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> 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

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.

The behaviour of \dt in the face of tables which shadow system tables is
actually even stranger:

postgres=# create table pg_proc (t text);
CREATE TABLE
postgres=# commit;
COMMIT
postgres=# \dt pg_proc
No matching relations found.

And I don't see any reason aggregates, operators, etc, shouldn't be any more
susceptible the shadowing problem.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-01-16 16:22:09 SnapshotResetXmin
Previous Message Magnus Hagander 2009-01-16 15:17:18 Re: libpq WSACleanup is not needed