From: Abhijit Menon-Sen <ams@oryx.com>
To: Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Jaime Casanova <systemguards@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Extending grant insert on tables to sequences
Date: Sat, 12 Jul 2008 17:00:41 +0530
Message-ID: <20080712113041.GA25112@toroid.org> (raw)
In-Reply-To: <3073cc9b0807110957w71869487p17fb58cb98abc520@mail.gmail.com>
References: <c2d9e70e0805221118x1411e00crd7d4aae7e6e4ea3d@mail.gmail.com>
<c2d9e70e0805232156p20dbe2b9j2a88d35f951d625e@mail.gmail.com>
<20080708133244.GB4095@alvh.no-ip.org>
<20080709185837.GA27406@toroid.org>
<20080709191125.GK3946@alvh.no-ip.org>
<20080710031140.GA427@toroid.org>
<3073cc9b0807110957w71869487p17fb58cb98abc520@mail.gmail.com>
At 2008-07-11 11:57:37 -0500, jcasanov@systemguards.com.ec wrote:
>
> attached is a new version of the patch, it implements Alvaro's
> suggestion and fix a bug i found (it wasn't managing GRANT ALL) :(
Looks good to me.
> About the SELECT issue, AFAIU Robert doesn't complaint he just asked
> what is the use case... if people think it should be removed ok, but
> OTOH: why? i don't think that affects anything...
As I said, I don't feel too strongly about it.
> <para>
> ! Granting permission on a table automatically extend
> ! permissions to any sequences owned by the table, including
> ! sequences tied to <type>SERIAL</> columns.
> </para>
Should be "Granting permissions on a table automatically extends those
permissions to...".
> + if ((istmt.objtype == ACL_OBJECT_RELATION) && (istmt.all_privs ||
> + (istmt.privileges & (ACL_INSERT | ACL_UPDATE | ACL_SELECT))))
> + {
The parentheses around the first comparison can go away, and also the
ones around the ACL_* here:
> + if (istmt.privileges & (ACL_INSERT))
> + istmt_seq.privileges |= ACL_USAGE;
> + if (istmt.privileges & (ACL_UPDATE))
> + istmt_seq.privileges |= ACL_UPDATE;
> + if (istmt.privileges & (ACL_SELECT))
> + istmt_seq.privileges |= ACL_SELECT;
-- ams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-patches@postgresql.org
Cc: ams@oryx.com, jcasanov@systemguards.com.ec, alvherre@commandprompt.com, systemguards@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: Extending grant insert on tables to sequences
In-Reply-To: <20080712113041.GA25112@toroid.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox