From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | ingram(at)samsix(dot)com |
Cc: | "Annie Bai" <annie_job(at)hotmail(dot)com>, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: existence of user |
Date: | 2002-02-03 03:18:25 |
Message-ID: | 21962.1012706305@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Stephen Ingram <ingram(at)samsix(dot)com> writes:
> On Saturday 02 February 2002 08:30 pm, Annie Bai wrote:
>> How can I access the system databases? when I use '\l', i can only get
>> those databases created by specific users. Is there a particular directory
>> holding all the system databases?
There are no "system databases"; only the ones you see with -l.
There are a few tables (pg_database, pg_shadow, pg_group) that are
actually system-wide; each has a single instance that's visible
in all databases of an installation. Everything else is local to
a particular database. For example, each database has its own
copy of pg_class, which is what makes it possible for each database
to have a different set of tables.
> I am guessing when one creates a database, the template information
> is copied across and PG then holds separate instances of system tables
> in each database.
Check.
> I don't know the details but I can only 'connect' to template1,
> not template0.
This is intentional; template0 isn't supposed to be modified, or indeed
used for anything except as a source template for CREATE DATABASE.
There is a better explanation of this in the 7.2 docs than there was in
7.1, see "template databases" at
http://developer.postgresql.org/docs/postgres/managing-databases.html
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | V R | 2002-02-04 10:24:11 | limit of 16 on arguments to functons |
Previous Message | Stephen Ingram | 2002-02-03 01:54:43 | Re: existence of user |