I'd use different users or roles for that - one with more restricted
rights. I'm not sure how to do it in your specific client.
In general, your user can be granted be granted read-only access and a
more powerful role to which it can switch explicitly.
mydb=> CREATE TABLE x (id INT);
ERROR: permission denied for schema public
LINE 1: CREATE TABLE x (id INT);
^
mydb=> SET ROLE powerful;
SET
mydb=> CREATE TABLE x (id INT);
CREATE TABLE
In PostgreSQL up to 15, you have to set "NOINHERIT" to your user so you
don't automatically get all the privileges on login. In 16, you can set
INHERIT FALSE when granting the role.
--
Filip Sedlák