Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group