Re: [HACKERS] Inconsistent syntax in GRANT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Marko Kreen <markokr(at)gmail(dot)com>, Bruno Wolff III <bruno(at)wolff(dot)to>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Inconsistent syntax in GRANT
Date: 2006-01-10 01:36:08
Message-ID: 23774.1136856968@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> At first I was just going to continue allowing table-like permissions
> for sequences if a GRANT [TABLE] was used, and add the new
> USAGE/SELECT/UPDATE capability only for GRANT SEQUENCE. The problem was
> that you could create a non-dumpable permission setup if you added
> DELETE permission to a sequence using GRANT TABLE, and USAGE permission
> using GRANT SEQUENCE. That couldn't be dumped with TABLE or with
> SEQUENCE, and I didn't want to do a double-dump of GRANT to fit that,
> nor did I want to throw an warning during the dump run.

Just ignore the inapplicable permissions during pg_dump. I think you're
making this harder than it needs to be...

> test=> REVOKE DELETE ON seq, tab FROM PUBLIC;
> WARNING: invalid privilege type DELETE for sequence
> ERROR: DELETE privilege invalid for command mixing sequences and non-sequences

This is just plain silly. If you're going to go to that length, why not
rearrange the code to avoid the problem instead?

> Would someone look at the change in src/backend/catalog/pg_shdepend.c
> for shared dependencies? We don't have any system catalog sequences let
> alone any shared catalog sequences, so I assume we are OK with assuming
> it is a relation.

We might have such in the future though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-01-10 02:27:00 Re: [HACKERS] Inconsistent syntax in GRANT
Previous Message Bruce Momjian 2006-01-10 01:24:12 Re: [HACKERS] Inconsistent syntax in GRANT

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-01-10 01:50:36 Re: TODO-item: Add sleep() function, remove from regress.c
Previous Message Tom Lane 2006-01-10 01:27:08 Re: Proposed patch to change "missing FROM" messages