I'm attempting to run this query

GRANT USAGE ON [db].users_uid_seq TO [user];

db and user are redacted (obviously).

I get this error:

ERROR:  syntax error at or near "GRANT"

I've tried a number of permutations of users, including / not including the db prefix, slightly different syntax, etc. per other stack exchange postings with no luck.

I'm using PG 8.4 with namecheap's shared hosting plan. It looks like this wouldn't be an issue with a newer version of pg but I don't have that option right now.

Any suggestions are much appreciated.

1 Answer 1


The syntax for GRANT in PostgreSQL 8.4 is

    [,...] | ALL [ PRIVILEGES ] }
    ON SEQUENCE sequencename [, ...]
    TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]

You can't just exclude SEQUENCE. If you could it'd be in [], without which it's not optional.

GRANT USAGE ON SEQUENCE users_uid_seq TO myUser;

As a side note, PostgreSQL 8.4 was EOL on July 2014


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.