Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id RAA18554 for postgres-dist; Wed, 23 Mar 1994 17:52:32 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199403240152.RAA18554@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id RAA18545 for <postgres@postgres.Berkeley.EDU>; Wed, 23 Mar 1994 17:52:32 -0800
Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id RAA01860; Wed, 23 Mar 1994 17:51:41 -0800
Message-Id: <199403240151.RAA01860@faerie.CS.Berkeley.EDU>
X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
From: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
To: "David Alan Nelson" <D.A.Nelson@newcastle.ac.uk>
Cc: postgres@postgres.Berkeley.EDU (Postgres)
Subject: Re: Setting up id's 
Reply-To: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
In-reply-to: Your message of Thu, 10 Mar 1994 15:17:42 +0000 (GMT) 
	     <AA24379.9403101517@swinhoe.ncl.ac.uk> 
Date: Wed, 23 Mar 94 17:51:40 -0800
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-dist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Wed, 23 Mar 94 17:52:32 -0800
Resent-XMts: smtp

"David Alan Nelson" <D.A.Nelson@newcastle.ac.uk> writes:
> I've tried using the retrieve command as illustrated in the installation
> instructions 'retrieve (u.usename, u.usesysid) from u in pg_user' from
> the monitor program when logged in as postgres, but this just fails and
> says the database is non-existent.  Presumably the monitor can not pick
> up these files, only those in the /data/base directory (it took a day to
> find this!), and therefore I can't see of any way to access this database.

this description assumes you are running 4.1 or later.

when you start up the postmaster, you tell it where the data directory
hierarchy is rooted (either on the command line or with the PGDATA
environment variable).  this can be anywhere.  all shared database 
relations are in .../data and all individual databases are stored in 
.../data/base/<foo> where <foo> is the name of the database.

if you point postgres at the wrong directory, it won't be able to 
find anything.

when you install the system, there will always be a database called
"template1".  you should always be able to say
	% monitor template1
and ask the query listed.

if you just type
	% monitor
without specifying a database, monitor assumes that you want to use 
a database corresponding to your $USER environment variable.  if no 
such database exists, it tells you that.  this is probably what's
going on here.

this is all documented, though you may have to hunt a bit.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
