Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA05143; Mon, 2 Dec 91 08:18:56 -0800
Message-Id: <9112021618.AA05143@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: datdba col in pg_database
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of "Mon, 02 Dec 91 03:49:52 PST."
             <9112021246.AA02882@dpi.inpe.br> 
Date: Mon, 02 Dec 91 08:14:58 PST

In message <9112021246.AA02882@dpi.inpe.br> you write:

> When I create a new database named, for example, "spring", logged to unix as
> user "ambdata", who is a valid postgres user, I can see that the column
> datdba in the class pg_database is set to a value that do not correspond
> to the column usesysid
> in class pg_user.
> 
> The same does not happen when the user "postgres" creates a new database. All
> databases created by postgres have the value "6" in the datdba column of the
> corresponding row in pg_database.

datdba is the oid of the pg_user tuple; try

	retrieve (pg_user.oid, pg_user.all) where pg_user.usename = "ambdata"

user postgres has usesysid == pg_user tuple oid == 6 by convention.

					mike olson
					postgres research group
					uc berkeley
					mao@cs.berkeley.edu
