ERROR: permission denied for sequence cities_id_seq using Postgres

后端 未结 4 1899
耶瑟儿~
耶瑟儿~ 2020-12-07 08:15

I\'m new at postgres (and at database info systems all in all). I ran following sql script on my database:

create table cities (
id serial primary key,
name          


        
4条回答
  •  轮回少年
    2020-12-07 09:03

    Since @Phil has a comment getting a lot of upvotes which might not get noticed, I'm using his syntax to add an answer that will grant permissions to a user for all sequences in a schema (assuming your schema is the default 'public')

    GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public to www;
    

提交回复
热议问题