Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a0sYv-0005T7-Ks for pgsql-bugs@arkaria.postgresql.org; Mon, 23 Nov 2015 14:57:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a0sYu-0001oN-Um for pgsql-bugs@arkaria.postgresql.org; Mon, 23 Nov 2015 14:57:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a0sYu-0001oC-Ee for pgsql-bugs@postgresql.org; Mon, 23 Nov 2015 14:57:48 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1a0sYs-0001aD-1I for pgsql-bugs@postgresql.org; Mon, 23 Nov 2015 14:57:47 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A922D5F79F; Mon, 23 Nov 2015 09:57:45 -0500 (EST) Date: Mon, 23 Nov 2015 09:57:45 -0500 From: Stephen Frost To: calebmeredith8@gmail.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13780: Multiple commands not allowed for creating a policy. Message-ID: <20151123145745.GF3685@tamriel.snowman.net> References: <20151122132327.1832.52687@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XOdUC5dvBsDfS6Vi" Content-Disposition: inline In-Reply-To: <20151122132327.1832.52687@wrigleys.postgresql.org> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-61-generic (x86_64) X-Uptime: 09:52:33 up 110 days, 23:23, 10 users, load average: 0.02, 0.10, 0.12 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --XOdUC5dvBsDfS6Vi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 --XOdUC5dvBsDfS6Vi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJWUylpAAoJEO1sijiDR2RVwpQQAJsDvc7+mJNVJMNVXC0KqL5K NAaK0ZYZjSXg5NnhLTAj5JCwNabJlj7Q52tO7zKnYb+Av7wujEcNMKGzDm6j7ow4 BfaQIO+xYobdVp0s14RE9MngGRQLEwIAIH+RnPZ++TgOJ8I7Fo0X8zq3H4PBgEyB zMm9yFtCATcyRJO8hNVL+JfDj5BTohausLStaCN4yhHed2UCTJ6YGLb4Q/zsmUNO yvGUwT3JADU0QIC+NsAAorBMw0NbNOVPfa0aw7CBXSwqxiwbuRGwI3U9B24DlXd8 PyBcl8Fv150eDydxrQInmasT4NH9gN7woeez4jcMni7LRhN4EpDuYTAw3oZQowD0 h1q58nFMaoY0f+qCyJSDfvmW5Y2TgQrlH5zFRpeB9R6T7FWVvPk3b8Rddew5zEDQ mmjjkoSkxaK4qvY98h1TYRc0NuiNnPQt09YZorDpLmg9vMo9WWpzkNfXf1ub/MKR 3ooIA/HINbjOCWRWzxPpALZcy8VVch7phnQo65X0a101tMk8Pu1Labh5f+kj5X1g G27/ctHyQZDypagb5OfQA+QlNd5+LdLr6HBAC/yDGXeQlBs+M/sokS/34q4Dk97g sCNtcf6Nk7mPAProZQSKdG8cbFsBrtFmt+RjFlrx8ZV4jUNVHNlyjep8A+U5HW+W eg6+AbC20ek/T8zNgZYm =vfhC -----END PGP SIGNATURE----- --XOdUC5dvBsDfS6Vi--