ОШИБКА: отказано в разрешении для последовательности towns_id_seq с использованием Postgres

Я новичок в postgres (и вообще в информационных системах баз данных). Я запустил следующий сценарий sql в моей базе данных:

create table cities (
id serial primary key,
name text not null
);

create table reports (
id serial primary key,
cityid integer not null references cities(id),
reportdate date not null,
reporttext text not null
);

create user www with password 'www';

grant select on cities to www;
grant insert on cities to www;
grant delete on cities to www;

grant select on reports to www;
grant insert on reports to www;
grant delete on reports to www;

grant select on cities_id_seq to www;
grant insert on cities_id_seq to www;
grant delete on cities_id_seq to www;

grant select on reports_id_seq to www;
grant insert on reports_id_seq to www;
grant delete on reports_id_seq to www;

Когда, как пользователь www, пытаюсь:

insert into cities (name) values ('London');

Я получаю следующую ошибку:

ERROR: permission denied for sequence cities_id_seq

Я понимаю, что проблема заключается в серийном типе. Вот почему я даю права на выбор, вставку и удаление для * _id_seq на www. Все же это не решает мою проблему. Что мне не хватает?

Ответы на вопрос(3)

Ваш ответ на вопрос