Re: [PATCH] allow has_table_privilege(..., 'usage') on sequences

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Abhijit Menon-Sen <ams(at)oryx(dot)com>
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:55:53
Message-ID: 27603.1220846153@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Abhijit Menon-Sen <ams(at)oryx(dot)com> writes:
> (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.

That train left the station already, and anyway you are failing to
consider "SELECT * FROM sequence", which definitely needs to have
different privileges from nextval()/currval().

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2008-09-08 04:01:03 Re: For what should pg_stop_backup wait?
Previous Message Abhijit Menon-Sen 2008-09-08 03:13:11 Re: [PATCH] allow has_table_privilege(..., 'usage') on sequences