Обсуждение: who can create schema?

Поиск
Список
Период
Сортировка

who can create schema?

От
Richard Hayward
Дата:
PostgreSQL 7.3.2

I'm trying to investigate why users can create new schema within a
database, without being explicitly being granted create permission on
that database.

I cant find a command that lists what privileges users have been
granted within a database. Can they create new schema or not?

And then, within a given schema, how could I list who can create new
objects?

Could anyone tell me?

regards
Richard


Re: who can create schema?

От
Tom Lane
Дата:
Richard Hayward <richard@tortoise.demon.co.uk> writes:
> I'm trying to investigate why users can create new schema within a
> database, without being explicitly being granted create permission on
> that database.

By default, they can't.  Perhaps you granted create permission on the
database to PUBLIC?  Also, are you sure the users in question are
not superusers?

> I cant find a command that lists what privileges users have been
> granted within a database. Can they create new schema or not?

There doesn't seem to be a psql backslash command that shows permissions
on databases; you'd need to look directly at pg_database, eg

    select datname, datacl from pg_database;

            regards, tom lane