From: | Szymon Guz <mabewlun(at)gmail(dot)com> |
---|---|
To: | Kasia Tuszynska <ktuszynska(at)esri(dot)com> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: postgres function does not handle PUBLIC - expected? |
Date: | 2010-08-10 19:10:50 |
Message-ID: | AANLkTi=oeOFdmMsr515Npgk_qupNX2BdUY60UyOg7O+8@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
2010/8/10 Kasia Tuszynska <ktuszynska(at)esri(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Kasia Tuszynska | 2010-08-10 19:26:05 | Re: postgres function does not handle PUBLIC - expected? |
Previous Message | Kasia Tuszynska | 2010-08-10 19:08:20 | postgres function does not handle PUBLIC - expected? |