Re: postgres function does not handle PUBLIC - expected?

Поиск
Список
Период
Сортировка
От Kasia Tuszynska
Тема Re: postgres function does not handle PUBLIC - expected?
Дата
Msg-id 232B5217AD58584C87019E8933556D110211D1AEDA@redmx2.esri.com
обсуждение исходный текст
Ответ на Re: postgres function does not handle PUBLIC - expected?  (Szymon Guz <mabewlun@gmail.com>)
Ответы Re: postgres function does not handle PUBLIC - expected?
Список pgsql-admin

Szymon,

The PUBLIC role is a default, non login role, that is created with every postgres cluster/instance.

To my knowledge PUBLIC  is a standard user in any rdbms. So, existence of public is not the issue here.

Sincerely,

Kasia

 

From: Szymon Guz [mailto:mabewlun@gmail.com]
Sent: Tuesday, August 10, 2010 12:11 PM
To: Kasia Tuszynska
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] postgres function does not handle PUBLIC - expected?

 

2010/8/10 Kasia Tuszynska <ktuszynska@esri.com>

Hello Postgres Gurus,

 

Is it expected behavior for the has_table_privilege postgres function to not handle the user PUBLIC? Or should I submit a bug?

 

The has_table_privilege function does not handle PUBLIC – the following queries returns the error:

SELECT has_table_privilege ('PUBLIC','bob.gdb.test1','SELECT') AS SELECT,

has_table_privilege ('PUBLIC','bob.gdb.test1','INSERT') AS INSERT,

has_table_privilege ('PUBLIC','bob.gdb.test1','DELETE') AS DELETE,

has_table_privilege ('PUBLIC','bob.gdb.test1','UPDATE') AS UPDATE;

 

ERROR:  role "PUBLIC" does not exist

SQL state: 42704

 

SELECT has_table_privilege ('public','bob.gdb.test1','SELECT') AS SELECT,

has_table_privilege ('public','bob.gdb.test1','INSERT') AS INSERT,

has_table_privilege ('public','bob.gdb.test1','DELETE') AS DELETE,

has_table_privilege ('public','bob.gdb.test1','UPDATE') AS UPDATE;

 

ERROR: role "public" does not exist

SQL state: 42704

Thank you,

Sincerley,

Kasia

 

Do you have any role that is named PUBLIC? I think that you don't have one. Check e.g. in the table pg_user.

 

regards

Szymon

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

Предыдущее
От: Szymon Guz
Дата:
Сообщение: Re: postgres function does not handle PUBLIC - expected?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: postgres function does not handle PUBLIC - expected?