Re: Views, views, views! (long)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, andrew(at)supernews(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Views, views, views! (long)
Date: 2005-05-10 19:58:50
Message-ID: 26116.1115755130@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jim C. Nasby" <decibel(at)decibel(dot)org> writes:
> On Tue, May 10, 2005 at 04:55:40PM +0200, Peter Eisentraut wrote:
>> PostgreSQL does not really distinguish between "system" and "user" things.
>> How will you do that?

> It's currently done using this function:

> create or replace function _pg_sv_system_schema(name) returns boolean
> as 'select $1 in (name ''pg_catalog'', name ''pg_toast'',
> name ''pg_sysviews'', name ''information_schema'')'
> language sql immutable strict;

> Objects that are in one of those schemas are considered system objects.
> This is how pg_dump does it

Peter's point still stands though: the *system* isn't making that
distinction. pg_dump needs to make a distinction so that it doesn't
dump built-in objects; which is not necessarily the same distinction
that a user might want to make. Thus, the fact that psql does it a
bit differently isn't necessarily a bug.

I think the real problem here is that it's hard to be all things to all
people. If you suppress display of certain objects, that may be nice
suppression of clutter for one user, yet render the view useless from
the perspective of another user --- or even the same user on a different
day, when he is looking for a particular built-in function for instance.
(I know it's always bugged the heck out of me that \df editorializes on
which functions it thinks I want to see.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-05-10 20:03:39 Re: Oracle Style packages on postgres
Previous Message Thomas Hallgren 2005-05-10 19:19:49 Re: Oracle Style packages on postgres