Re: psql \l to accept patterns

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql \l to accept patterns
Date: 2013-01-07 22:37:13
Message-ID: CA+TgmoZYOM7LqhkyLmtHBcD5DD2Hgn24K0r3adfe=FpcjfVAGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 7, 2013 at 5:14 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> We removed showing system functions and operators from \df and \do
> without S. Those are needed all the time. This was controversial at
> the time, but it's the way it is now. The definition of "S", I suppose,
> is more like "is there after database is created", not "typical users
> care about these objects".

System functions and operators are needed all the time, but so are
system tables and views, and the old behavior was that the latter were
suppressed by default and the former were included by default. So I
consider that change to be well-justified on consistency grounds.
There's a practical consideration, as well. Out of the box, there are
2400 entries for functions and 3 for databases. This means that the
old \df behavior made it very hard to figure out what user-defined
functions exist in your database, but there's no corresponding problem
with \l. Finally, note that you can drop the postgres database (and
everything else will still work) but you cannot drop
pg_table_is_visible(oid), because, as the error message will inform
you, it is required by the database system.

If we make the postgres database undroppable, unrenamable, and
strictly read-only, I will happily support a proposal to consider it a
system object. Until then, it's no more a system object than the
public schema - which, you will note, \dn has no compunctions about
displaying, even without S.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-01-07 23:02:30 Re: in-catalog Extension Scripts and Control parameters (templates?)
Previous Message Andrew Dunstan 2013-01-07 22:15:47 Re: json api WIP patch