Re: Views, views, views! (long) - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Views, views, views! (long)
Date
Msg-id 20050510173638.GG31103@decibel.org
Whole thread Raw
In response to Re: Views, views, views! (long)  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Views, views, views! (long)
List pgsql-hackers
On Tue, May 10, 2005 at 04:55:40PM +0200, Peter Eisentraut wrote:
> Am Montag, 9. Mai 2005 00:41 schrieb Andrew - Supernews:
> > >> c) In most places, "system" objects are segregated from
> > >> "user" objects,  e.g. pg_user_indexes
> > >
> > > I think that is a bad idea as it goes against the fundamental design of
> > > PostgreSQL.
> >
> > In what way? Please elaborate.
> 
> 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 (except for casts, which are considered
system objects if the source type, destination type, and conversion
function are ALL in system schemas).

psql also distinguishes between system and user tables, although it
restricts this to pg_catalog.
-- 
Jim C. Nasby, Database Consultant               decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Views, views, views: Summary of Arguments
Next
From: "Dann Corbit"
Date:
Subject: Re: Views, views, views: Summary of Arguments