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               [EMAIL PROTECTED] 
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?"

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to