postgres function does not handle PUBLIC - expected? - Mailing list pgsql-admin

From Kasia Tuszynska
Subject postgres function does not handle PUBLIC - expected?
Date
Msg-id 232B5217AD58584C87019E8933556D110211D1AE9F@redmx2.esri.com
Whole thread Raw
Responses Re: postgres function does not handle PUBLIC - expected?  (Szymon Guz <mabewlun@gmail.com>)
Re: postgres function does not handle PUBLIC - expected?  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-admin

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

pgsql-admin by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: psql - password authentication failed for user "singh09721"
Next
From: Szymon Guz
Date:
Subject: Re: postgres function does not handle PUBLIC - expected?