Обсуждение: Grants on sequences via Grant Wizard

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

Grants on sequences via Grant Wizard

От
Bartosz Dmytrak
Дата:
Hi all,
I've noticed Grant Wizard (schema node) generates odd SQL to grant privileges on sequence. Sequence is treated as a table, so SQL may look like this:

GRANT SELECT, UPDATE, INSERT, DELETE, REFERENCES ON TABLE "MySchema"."MySeq" TO "MyGroup";

what produces warning message:
WARNING:  sequence "MySeq" only supports USAGE, SELECT, and UPDATE privileges

Of course SELECT is granted :)

My suggestion is to change this behavior to produce SQL dedicated to sequence:
GRANT SELECT ON SEQUENCE "MySchema"."MySeq" TO "MyGroup";

Without (INSERT, UPDATE, etc).
Also there is no USAGE option available in Grant Wizard window (schema node only).

env pgAdmin 1.16.1 on Windows.

Regards,
Bartek

Re: Grants on sequences via Grant Wizard

От
Dave Page
Дата:
Dhiraj, can you look at this please?

Thanks.

On Thu, May 2, 2013 at 9:21 AM, Bartosz Dmytrak <bdmytrak@gmail.com> wrote:
> Hi all,
> I've noticed Grant Wizard (schema node) generates odd SQL to grant
> privileges on sequence. Sequence is treated as a table, so SQL may look like
> this:
>
> GRANT SELECT, UPDATE, INSERT, DELETE, REFERENCES ON TABLE "MySchema"."MySeq"
> TO "MyGroup";
>
> what produces warning message:
> WARNING:  sequence "MySeq" only supports USAGE, SELECT, and UPDATE
> privileges
>
> Of course SELECT is granted :)
>
> My suggestion is to change this behavior to produce SQL dedicated to
> sequence:
> GRANT SELECT ON SEQUENCE "MySchema"."MySeq" TO "MyGroup";
>
> Without (INSERT, UPDATE, etc).
> Also there is no USAGE option available in Grant Wizard window (schema node
> only).
>
> env pgAdmin 1.16.1 on Windows.
>
> Regards,
> Bartek



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: Grants on sequences via Grant Wizard

От
Bartosz Dmytrak
Дата:
Hi,
one self correction:
UPDATE - is available for sequences - my mistake.

Thanks for your attention.


Regards,
Bartek