Inconsistent syntax in GRANT

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Inconsistent syntax in GRANT
Date: 2006-01-04 01:19:41
Message-ID: 200601031719.41604.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Folks,

Just got tripped up by this:

GRANT SELECT ON table1 TO someuser;
GRANT SELECT ON table1_id_seq TO someuser;
.... both work

However,
GRANT SELECT ON TABLE table1 TO someuser;
... works, while ....
GRANT SELECT ON SEQUENCE table1_id_seq TO someuser;
... raises an error.

This is inconsistent. Do people agree with me that the parser should
accept "SEQUENCE" there, since the optional object name works for all
other objects? Is there some technical reason this is difficult to do?

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2006-01-04 01:45:13 Deferrable UNIQUE INDEX?
Previous Message Josh Berkus 2006-01-04 01:16:19 Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and

Browse pgsql-patches by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2006-01-04 02:18:06 Re: Inconsistent syntax in GRANT
Previous Message Joe Conway 2006-01-03 23:50:32 Re: [BUGS] BUG #2129: dblink problem