I created a read-only user in PostgreSQL and it is still able to create tables:
I created a test DB and then created a readonly2
user. Gave it only select privileges on 2 tables. When I log into this DB as readonly2
user I am still able to create tables:
create database test1
create user readonly2 with password 'readonly';
grant select on test1 to readonly2
grant select on test2 to readonly2
where test1
and test2
are 2 tables in test DB.
Now when I log into the test DB as readonly2
user, I am able to create tables:
test=> create table test55 (id int);
CREATE TABLE
I just want to create a read-only user with select permissions. I do not want to grant create table permissions.