Re: CREATE DATABASE WITH OWNER '??'; - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: CREATE DATABASE WITH OWNER '??';
Date
Msg-id 39195A63.D1F7CF6C@tm.ee
Whole thread Raw
In response to Re: CREATE DATABASE WITH OWNER '??';  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
The Hermit Hacker wrote:
> 
> On Wed, 10 May 2000, Peter Eisentraut wrote:
> 
> > On Tue, 9 May 2000, The Hermit Hacker wrote:
> >
> > > CREATE DATABASE WITH OWNER?
> >
> > Databases already have owners, so this syntax extensions (not a bad idea
> > IMHO) isn't going to change the substance of things really.
> 
> tables have owners .. right now, as far as I can tell, the database itself
> doesn't have an owner.  Unless I'm missing something, any user that can
> connect to a database can create new tables in that database, regardless
> of what they can do to the existing tables in that database ...

hannu=# select * from pg_database; datname  | datdba | encoding |  datpath  
-----------+--------+----------+-----------template1 |    501 |        0 | template1hannu     |    501 |        0 |
hannu
(2 rows)

I'm pretty sure that the datdba field is the owner id.

That anyone is allowed to do anything is another matter.

-----------------
Hannu


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: pg_hba.conf && ident ...
Next
From: Thomas Lockhart
Date:
Subject: FTP site