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