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 ...



Wed, 10 May 2000 08:49:09 -0300 (ADT)
The Hermit Hacker <scrappy@hub.org>
Re: CREATE DATABASE WITH OWNER '??';
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 | template1
 hannu     |    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

Wed, 10 May 2000 15:47:31 +0300
Hannu Krosing <hannu@tm.ee>
Re: CREATE DATABASE WITH OWNER '??';
The Hermit Hacker writes:

> tables have owners .. right now, as far as I can tell, the database itself
> doesn't have an owner.

peter ~/pg-install/bin$ ./psql -l
 List of databases
 Database  | Owner
-----------+-------
 peter     | peter
 template1 | peter
(2 rows)

> 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 ...

That is true, but IMHO schemas are are much better way to handle that.

-- 
Peter Eisentraut                  Sernanders vï¿½g 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


Wed, 10 May 2000 23:24:59 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: CREATE DATABASE WITH OWNER '??';