pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Schema authorization after create database.
4+ messages / 3 participants
[nested] [flat]
* Schema authorization after create database.
@ 2005-08-11 09:34 Ian FREISLICH <if@hetzner.co.za>
2005-08-11 10:57 ` Re: Schema authorization after create database. Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
2005-08-11 14:08 ` Re: Schema authorization after create database. Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 4+ messages in thread
From: Ian FREISLICH @ 2005-08-11 09:34 UTC (permalink / raw)
To: pgsql-admin
Hi
I ran into this little astonishment yesterday on 7.4.8. When I
create a database connected as the super user using:
CREATE DATABASE foo OWNER = foo;
The database is indeed owned by user foo, but the automatically
created public schema is is owned by the database super user. Should
this schema not be created as owned by the database owner specified
in the CREATE DATABASE command?
Our work around is to drop the public schema and recreate it after
reconnecting as the database owner, but that seems like work I
shouldn't have to do.
Is this a problem or am I expecting something that I shouldn't?
Ian
--
Ian Freislich
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Schema authorization after create database.
2005-08-11 09:34 Schema authorization after create database. Ian FREISLICH <if@hetzner.co.za>
@ 2005-08-11 10:57 ` Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
1 sibling, 0 replies; 4+ messages in thread
From: Tsirkin Evgeny @ 2005-08-11 10:57 UTC (permalink / raw)
To: Ian FREISLICH <if@hetzner.co.za>; +Cc: pgsql-admin
We have simular behavor:
createdb -U user1 mydb
pg_restore -U user1 -d mydb filename
And the pg_restore complains about the wrong user .I have alwais wolk
around this as supreuser.
Evgeny
Ian FREISLICH wrote:
>Hi
>
>I ran into this little astonishment yesterday on 7.4.8. When I
>create a database connected as the super user using:
>
>CREATE DATABASE foo OWNER = foo;
>
>The database is indeed owned by user foo, but the automatically
>created public schema is is owned by the database super user. Should
>this schema not be created as owned by the database owner specified
>in the CREATE DATABASE command?
>
>Our work around is to drop the public schema and recreate it after
>reconnecting as the database owner, but that seems like work I
>shouldn't have to do.
>
>Is this a problem or am I expecting something that I shouldn't?
>
>Ian
>
>--
>Ian Freislich
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Schema authorization after create database.
2005-08-11 09:34 Schema authorization after create database. Ian FREISLICH <if@hetzner.co.za>
@ 2005-08-11 14:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-08-12 11:04 ` Re: Schema authorization after create database. Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
1 sibling, 1 reply; 4+ messages in thread
From: Tom Lane @ 2005-08-11 14:08 UTC (permalink / raw)
To: Ian FREISLICH <if@hetzner.co.za>; +Cc: pgsql-admin
Ian FREISLICH <if@hetzner.co.za> writes:
> I ran into this little astonishment yesterday on 7.4.8. When I
> create a database connected as the super user using:
> CREATE DATABASE foo OWNER = foo;
> The database is indeed owned by user foo, but the automatically
> created public schema is is owned by the database super user. Should
> this schema not be created as owned by the database owner specified
> in the CREATE DATABASE command?
That's the way it's supposed to work. CREATE DATABASE does not change
anything inside the copied database.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Schema authorization after create database.
2005-08-11 09:34 Schema authorization after create database. Ian FREISLICH <if@hetzner.co.za>
2005-08-11 14:08 ` Re: Schema authorization after create database. Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-08-12 11:04 ` Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
0 siblings, 0 replies; 4+ messages in thread
From: Tsirkin Evgeny @ 2004-08-12 11:04 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ian FREISLICH <if@hetzner.co.za>; pgsql-admin
Yep.But this is a little strange ,maybe we should ask to change it?
Evgeny.
Tom Lane wrote:
> Ian FREISLICH <if@hetzner.co.za> writes:
>
>>I ran into this little astonishment yesterday on 7.4.8. When I
>>create a database connected as the super user using:
>
>
>>CREATE DATABASE foo OWNER = foo;
>
>
>>The database is indeed owned by user foo, but the automatically
>>created public schema is is owned by the database super user. Should
>>this schema not be created as owned by the database owner specified
>>in the CREATE DATABASE command?
>
>
> That's the way it's supposed to work. CREATE DATABASE does not change
> anything inside the copied database.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-08-11 14:08 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-11 09:34 Schema authorization after create database. Ian FREISLICH <if@hetzner.co.za>
2005-08-11 10:57 ` Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
2005-08-11 14:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-08-12 11:04 ` Tsirkin Evgeny <tsurkin@mail.jct.ac.il>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox