Create Read only user

From: Yambu <hyambu(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Create Read only user
Date: 2021-01-22 08:58:52
Message-ID: CALhHtcA5CYQU0SLU673qAdZiixAJJ8GF2ZEJV7YSiq03h5W-jw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello

I created a user like this

CREATE USER user1 WITH PASSWORD '<password>';

GRANT CONNECT ON DATABASE db1 TO user1;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO user1;

What amazes me is that when I connect using user1, I'm able to create a
table and drop it. How can this be?

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rohit Rajput 2021-01-22 09:05:13 Re: Create Read only user
Previous Message Stéphane KANSCHINE 2021-01-22 08:40:29 Re: Regarding 500 Internal Server Error