Re: Consistent \d commands in psql

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Consistent \d commands in psql
Date: 2008-04-02 15:52:23
Message-ID: 37ed240d0804020852t7eeb24y5d60b0ec1d8419ee@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/04/2008, Greg Sabino Mullane wrote:
> > \df Lists all user functions
> > \df [pattern] Lists both system and user functions matching [pattern]
> > \df * Lists all system and user functions
>
> I don't like this for two reasons: the items returned changes based on
> the existence of args, rather than on the command itself, and more
> importantly, this would make it inconsistent with the other backslash
> commands.
>

To address your first complaint, I think it makes perfect sense to
behave differently based on whether an argument has been supplied.

The existence of a pattern tells you something about the user's
intention in issuing the command. If they provide a pattern, they
probably want to /search/ for something. If they don't provide a
pattern they probably want to get a /listing/ of some set.

Regards,
BJ
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: http://getfiregpg.org

iD8DBQFH86u15YBsbHkuyV0RAmcMAKCy44zQaEcPA+QDpXr2+3vrSPucDwCgg3FG
8cq7P2DvI/ogqrHwM9Zpzx0=
=IEvi
-----END PGP SIGNATURE-----

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Chris Marcellino 2008-04-02 15:55:18 Re: [HACKERS] POSIX shared memory support
Previous Message Bruce Momjian 2008-04-02 15:50:27 Re: POSIX shared memory support