Re: [7.4] "permissions problem" with pl/pgsql function

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: [7.4] "permissions problem" with pl/pgsql function
Дата
Msg-id 400C74E0.4050205@familyhealth.com.au
обсуждение исходный текст
Ответ на [7.4] "permissions problem" with pl/pgsql function  ("Marc G. Fournier" <scrappy@hub.org>)
Список pgsql-hackers
> 420_test=> select
> dropgeometrycolumn('420_test','lroadline61','roads61_geom');
> ERROR:  permission denied for relation pg_attribute
> CONTEXT:  PL/pgSQL function "dropgeometrycolumn" line 19 at execute statement
> 
> the database was created as:
> 
> CREATE DATABASE <db> WITH OWNER = <owner>
> 
> and I'm connected to the database as the owner ... shouldn't the "system
> tables" also be owned by the owner?

No, you have to have the usecatupd field set to true in your pg_shadow 
row to be able to modify the catalogs.  This is automatically assigned 
to a superuser, not the database owner.  (Otherwise it's trivial to munt 
someone else's database by deleting from pg_database or pg_shadow...)

Chris



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Old binary packages.
Следующее
От: "Thomas Hallgren"
Дата:
Сообщение: Re: SPI_prepare and error recovery