Re: Viewing non-system objects in psql

Поиск
Список
Период
Сортировка
От Jon Jensen
Тема Re: Viewing non-system objects in psql
Дата
Msg-id Pine.LNX.4.63.0506161614190.5207@ynfu.ovalna.fjrygre.arg
обсуждение исходный текст
Ответ на Viewing non-system objects in psql  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список 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, ...

В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Viewing non-system objects in psql
Следующее
От: David Pratt
Дата:
Сообщение: Advice on structure /sequence / trigger