Larry Rosenman wrote:
> Greetings,
> I think I found a bug, or at least a POLA violation. At work, I created
> a user that is NOT a superuser, nor can that user create databases. When I
> did a create database foo owner bar, all the schemas are set to be owned by
> the superuser that created the database, not the database owner.
>
> Shouldn't everything that is in the DB be owned by the purported owner?
>
> This is on 8.2.3, btw.
>
> Thanks!
>
>
>
umm ... objects are initially owned by their creator, no? Ownership of a
db means you can grant privs over the db, but ownership doesn't cascade.
If you want your user to own objects you should arrange for that user to
create them, or run ALTER objtype foo OWNER TO username. The latter is
what pg_dump does.
cheers
andrew