Subject: Setting up id's

From: "David Alan Nelson" <[email-masked]>
Date: Thu, 10 Mar 1994 15:17:42 +0000 (GMT)

Hi All

I hope someone can help me.  Postgres has just been installed on our 
system, and I've been given the job of administering it.

I've started setting up user id's for using the system, but am unable to
get a list of people I have registered.

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.

So can someone please tell me whether I can get a list of registered postgres
users!

Cheers

Dave Nelson
-- 

Mail ID : [email-masked]

Computing Science, University of Newcastle upon Tyne, UK.  (091) 222 8789

---

From: [email-masked] (Paul M. Aoki)
Date: Wed, 23 Mar 94 17:51:40 -0800

> 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  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki