Re: Consistent \d commands in psql - Mailing list pgsql-patches

From Heikki Linnakangas
Subject Re: Consistent \d commands in psql
Date
Msg-id 47EA4EF4.9030105@enterprisedb.com
Whole thread Raw
In response to Consistent \d commands in psql  (Greg Sabino Mullane <greg@turnstep.com>)
List 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


pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Proposed patch - psql wraps at window width
Next
From: Simon Riggs
Date:
Subject: Re: Bulk Insert tuning