Newbie questions (pg_global, tablespace, pg_temp, ...)

From: "Alexi Gen" <sqlcatz(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Newbie questions (pg_global, tablespace, pg_temp, ...)
Date: 2007-01-18 05:32:18
Message-ID: BAY21-F110DB66FF516C5CD771C87ADAA0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I'm new to postgreSQL (not databases) and trying to find my way arouund.
Have a couple of questions:

(a) In which dir is the pg_global stored?
Is it "C:\Program Files\PostgreSQL\8.2\data\global"?

(b) Why is the pg_tablespace.spclocation column=null for pg_default &
pg_global?

(c) When creating an object - if the tablespace attribute is not specified -
it is resolved as follows:
Index - Parent Table on which the index is being created.
Table - Tablespace of the database in which the table is being created.
Database - Tablespace of the template from which this database was created
(Ex: template1).

If the above is the method by which the tablespace name is resolved, when
does the default_tablespace variable get used?
Or Will the above come into the picture if default_tablespace=NULL?

(d)
The following objects are shared between all databases in a cluster.
pg.catalog.pg_group: List of user groups (View).
pg.catalog.pg_shadow: List of valid users. (View)
pg.catalog.pg_database: List of databases in the cluster. (Table)
pg.catalog.pg_tablespace: List of tablespaces. (Table)

There are 33 tables & 33 Views in the pg_catalog schema.
Are there any other tables & views that are common to all databases in a
cluster?
Why have cluster common objects sitting in each database in the cluster?
How can we differentiate between objects in pg_catalog?
Those that are specific to the database and those that are common to the
cluster?

(e) Can someone please point me to a document/URL that has information about
using temp tables in postgreSQL?
I have already read material that is available in the official PostgreSQL
documentation.
Want something more - the inner workings, pg_temp*, etc..

Cheers!
sqlcatz

_________________________________________________________________
Catch all the cricketing action right here. Live score, match reports,
photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2007-01-18 05:49:09 Re: How I can read-back a serial value just inserted?
Previous Message stevegy 2007-01-18 04:25:47 Re: &nbsp;&nbsp;The&nbsp;jdbc