| From: | Abhijit Menon-Sen <ams(at)oryx(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: [PATCH] allow has_table_privilege(..., 'usage') on sequences |
| Date: | 2008-09-08 03:13:11 |
| Message-ID: | 20080908031311.GA19756@toroid.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
At 2008-09-06 19:59:55 -0400, tgl(at)sss(dot)pgh(dot)pa(dot)us wrote:
>
> So I'm thinking it would be better to invent a has_sequence_privilege
> family of functions.
Perhaps.
I certainly wouldn't object to that approach. If there had been such a
function, I would have used it; and, since has_table_privilege doesn't
help me in any released version, I have nothing invested in that way
of doing things.
(I can't help but think that the USAGE privilege is a bit unfortunate.
If granting SELECT rights allowed currval(), INSERT allowed nextval(),
and UPDATE allowed nextval() and setval(), then has_table_privilege()
would have been sufficient and there would be no need to invent a new
set of functions just to check USAGE.
At the moment, however, I have to grant UPDATE instead of USAGE, both
for compatibility with 8.1, and because there is no easy way to check
if USAGE has already been granted, even though I don't want to allow
setval() at all. Pity.)
-- ams
PS. I'm sorry I haven't been able to review any patches this time. I
meant to, but a sequence of unfortunate events conspired to keep me
busy elsewhere. I look forward to participating again next time.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2008-09-08 03:55:53 | Re: [PATCH] allow has_table_privilege(..., 'usage') on sequences |
| Previous Message | Alvaro Herrera | 2008-09-08 02:21:49 | Re: Move src/tools/backend/ to wiki |