With Postgres 15 it should be as simple as: CREATE ROLE CREATE ROLE u_tdb_ro WITH LOGIN; GRANT pg_read_all_data TO u_tdb_ro; In previous versions the PUBLIC (pseudo) role was granted the CREATE privilege on the public schema which is no longer the case since Postgres 15 For previous versions it's highly recommended to do this as well: revoke create on schema public from public;
GRANT CREATE ON SCHEMA public TO u_tdb;
set role to u_tdb;drop table if exists test_230824_B;create table if not exists test_230824_B(a int primary key);insert into test_230824_B values (1), (2);select * from test_230824_B;
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных