Re: BUG #13780: Multiple commands not allowed for creating a policy.

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: calebmeredith8(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13780: Multiple commands not allowed for creating a policy.
Date: 2015-11-23 14:57:45
Message-ID: 20151123145745.GF3685@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Caleb,

* calebmeredith8(at)gmail(dot)com (calebmeredith8(at)gmail(dot)com) wrote:
> When performing a grant I can do:
>
> GRANT INSERT, UPDATE, DELETE ON TABLE person TO user;
>
> But when creating a policy I can't do:
>
> CREATE POLICY user_write ON person FOR INSERT, UPDATE, DELETE TO user
> USING (…);
>
> The specific error is:
>
> ERROR: syntax error at or near ","
> LINE 1: ...TE POLICY user_write ON person FOR INSERT, UPDATE, ...
>
> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2015-11-23 14:59:55 Re: BUG #13780: Multiple commands not allowed for creating a policy.
Previous Message Tom Lane 2015-11-23 14:44:28 Re: pg_dump - wrong order with inheritance