Re: BUG #13780: Multiple commands not allowed for creating a policy. - Mailing list pgsql-bugs

From Stephen Frost
Subject Re: BUG #13780: Multiple commands not allowed for creating a policy.
Date
Msg-id 20151123145745.GF3685@tamriel.snowman.net
Whole thread Raw
In response to BUG #13780: Multiple commands not allowed for creating a policy.  (calebmeredith8@gmail.com)
List pgsql-bugs
Caleb,

* calebmeredith8@gmail.com (calebmeredith8@gmail.com) wrote:
> When performing a grant I can do:
>=20
>     GRANT INSERT, UPDATE, DELETE ON TABLE person TO user;
>=20
> But when creating a policy I can't do:
>=20
>     CREATE POLICY user_write ON person FOR INSERT, UPDATE, DELETE TO user
>       USING (=E2=80=A6);
>=20
> The specific error is:
>=20
>     ERROR:  syntax error at or near ","
>     LINE 1: ...TE POLICY user_write ON person FOR INSERT, UPDATE, ...
>=20
> This doesn't seem to be intended as the GRANT specification allows it, and
> CREATE POLICY supports the ALL command.

This is certainly something which we can look at adding support for.  I
agree that it'd be nice to have, though I'm curious what your specific
use-case for it is, if you don't mind sharing.

Just to be clear, this is a new feature and not a bug.  The CREATE
POLICY documentation is correct- you can currently only specify one
command and the system catalog underneath only allows for one command
per policy.

Thanks!

Stephen

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump - wrong order with inheritance
Next
From: Stephen Frost
Date:
Subject: Re: BUG #13780: Multiple commands not allowed for creating a policy.