Re: Viewing non-system objects in psql

From: Jon Jensen <jon(at)endpoint(dot)com>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Viewing non-system objects in psql
Date: 2005-06-16 22:24:59
Message-ID: Pine.LNX.4.63.0506161614190.5207@ynfu.ovalna.fjrygre.arg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 16 Jun 2005, Greg Sabino Mullane wrote:

> I recently submitted a patch that makes all the database objects behave
> in the same way as far as the backslash psql commands. Currently, tables
> work like this: \dt lists all non-system tables in your path, while
> \dtS shows only the system tables. The idea is to expand that functionality
> to other database objects, e.g. functions. Currently, \df will show you a
> list of *all* functions, including the system ones. Since there are currently
> over 1500 system functions, this limits its usefullness. The patch
> standardizes everything on the way we do tables and indexes - the user ones
> are shown by default, and you add a capital "S" if you really want to see the
> system ones. So the patch would have \df show all your functions, \dD show
> all your domains, \doS shows the system operators, etc.
>
> This all seems to make sense to me, and I thought the debate was over :),
> but there has been some feedback on the patches list and we now seem to
> be at an impasse, so I thought I would invite a larger audience (other
> than the handful of us that read patches) to comment on this.
>
> I maintain that it makes more sense for those few people who regularly look
> at system functions to add a "S" than to have everyone else have to do
> things such as "\df public." Of course, there is currently no way to
> see all the non-system functions if they are not all contained in one
> schema. Some have advocated some sort of configuration variable to control
> the behavior, but this seems like extreme overkill to me and will lead to
> more confusion, as people forget which "mode" they are in. Far simpler to
> simply add a capital "S" for those rare occasions when you need to.
>
> Someone else raised the argument that we should keep them separated because
> tables are more important for a working database than functions. I don't buy
> this one either: for those of us that use functions, domains, operators, etc.,
> they are very, very important indeed. All objects should be treated equally.
> It also makes things much easier for users to have everything be consistent,
> rather than wondering why "S" is needed in some cases and not others.

I agree with you. I expect to see user-created functions with \df by
default, and rarely look at the system functions. The S addition makes
perfect sense for tables and views, and even though I know about the
current inconsistent behavior, I still forget sometimes and expect \df to
act similarly.

Jon

--
Jon Jensen
End Point Corporation
http://www.endpoint.com/
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Pratt 2005-06-17 00:23:11 Advice on structure /sequence / trigger
Previous Message Gavin Sherry 2005-06-16 22:22:16 Re: Autovacuum in the backend