PostgreSQL 썸네일형 리스트형 DB계정 생성 [PostgreSQL] CREATE ROLE target_work(계정네임) LOGIN PASSWORD 'new1234!'; grant usage on schema target(스키마이름) to target_work(계정네임); grant select, insert, update, delete on all tables in schema target(스키마이름) to target_work(계정네임); Roll level settingAlter role role_name set search_path to schema1, schema2; 계정 초기화alter user postgres(계정이름) with password 'password'; select * from information_schema.role_table_grants w.. 자주쓰는 Querys [postgres][PostgreSQL] 접속# Local$ psql -U postgres # port, DB $ psql -p 5444 -U dbuser mydb 계정확인\duselect * from PG_SHADOW; 계정생성# 단순생성postgres=# CREATE USER username; # 패스워드와 함께 생성CREATE ROLE kt_user WITH PASSWORD 'abcd1234'; # 유효기간 설정과 함께 생성CREATE ROLE kt_user WITH LOGIN PASSWORD 'abcd1234' VALID UNTIL '201501-01'; # 데이터베이스 생성권한과 유저생성 권한을 부여해서 생성CREATE ROLE kt_user WITH CREATEDB CREATEROLE;CREATE ROLE username with S.. 이전 1 다음