Re: psql \d* and system objects

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>
Subject: Re: psql \d* and system objects
Date: 2009-04-01 03:09:44
Message-ID: 200904010309.n3139iC10168@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Treat wrote:
> Actually I find the inconsistency to hurt usability, which is typically what
> you get with inconsistent interfaces.
>
> I'm not certain, but I think I would be happier if we did:
>
> \d* user space objects
> \d*S include system objects
>
> For those that want system only, do
> \d*S pg_catalog.
> ( if you want to argue temp/toast, adjust the search accordingly)
>
> I think the trick to getting this working is to enforce this with search
> patterns *and* tab completion as well. Yes, this means that Tom's desire for

I talked to Robert on IM and found two new reasons to make 'S' assumed
if a pattern is supplied. The first is the use of tab completion:

test=> \df si<tab><tab>
sign similar_escape sin
test=> \df sin
List of functions
Schema | Name | Result data type | Argument data types
--------+------+------------------+---------------------
(0 rows)

As you can see tab-tab assumes system tables are visible, but current CVS
does not without 'S'. The second case is:

test=> \df pg_catalog.sin
List of functions
Schema | Name | Result data type | Argument data types
--------+------+------------------+---------------------
(0 rows)

Only \dfS works in this case.

I think we should move forward and assume 'S' for \d* patterns; it is
inconsistent, but usability requires it.

Objections?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-01 03:24:16 Re: Small patch removing the "crypt" auth from sample pg_hba.conf
Previous Message Werner Echezuria 2009-04-01 02:57:47 Sort a column that does not exist