Create readonly session in Postgres / psql gary 10 years ago To make the current connection readonly, just run this: SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY;