728x90
Postgresql 15 user create 유저생성
postgresql 15버전에서 기본 유저 및 데이터 베이스를 생성했는데 public 스키마에 접근이 불가능해서 구글링해보니
15버전부터는 public 스키마에 권한을 따로 줘야 했다.
CREATE DATABASE testuser;
CREATE USER testuser WITH ENCRYPTED PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE testuser TO testuser;
GRANT ALL ON SCHEMA public TO testuser;
GRANT ALL ON DATABASE testuser TO testuser;
ALTER DATABASE testuser OWNER TO testuser;
GRANT USAGE, CREATE ON SCHEMA public TO testuser;
https://stackoverflow.com/questions/74110708/postgres-15-permission-denied-for-schema-public
Postgres 15. permission denied for schema public
Can't create tables in public schema as non-superuser postgres - super user. What I've done: ALTER SCHEMA public owner to postgres; CREATE USER admin WITH PASSWORD 'my-password'; GRANT USAGE,
stackoverflow.com
728x90
'DB > Postgres' 카테고리의 다른 글
Postgresql SSL 적용 (0) | 2023.04.03 |
---|---|
postgresql 주말을 제외한 한 달의 모든 요일 얻기 (0) | 2023.03.29 |
Postgresql 쉼표로 구분된 열을 행으로 변환 (0) | 2023.03.29 |