Re: Consistent \d commands in psql

From: "Heikki Linnakangas" <heikki(at)enterprisedb(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-03-26 13:26:12
Message-ID: 47EA4EF4.9030105@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Greg Sabino Mullane wrote:
> Attached is an updated version of my psql patch that makes the \d
> backslash commands perform in an intuitive, consistent way.
> Specifically, the following objects will be treated as first class
> citizens (as tables and indexes currently are) by showing all the
> non-system objects by default and requiring a "S" to see the system
> ones.
>
> aggregates
> conversions
> comments
> domains
> operators
> functions
> types
>
> Currently, there is no way to view all the non-system functions in a
> database using backslash commands, as you can with \dt, unless all of
> the functions happen to be in a single schema ("\df myschema."). With
> this patch, it would be as simple as "\df", and the current behavior
> would be done with "\dfS".

Yes, that seems like a good idea. \df in particular has been too noisy
to be usable. Not sure about conversions and domains; I doubt anyone
creates custom conversions in practice, and there's no system domains in
a standard installation.

Does anyone want to argue that there's a backward-compatibility problem
with changing \df? I don't think there is; you shouldn't be using psql
backslash commands in an application.

> This patch also adds a few new things to the tab-completion table, such
> as comments and conversions.

There's a bunch of merge conflicts in the diff.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2008-03-26 13:28:41 Re: Bulk Insert tuning
Previous Message Alvaro Herrera 2008-03-26 13:25:36 Re: Proposed patch - psql wraps at window width