티스토리 뷰
반응형
cli로 postgresql 접속
sudo -i -u postgres psql
유저 생성/ 데이터베이스 생성/ 권한 부여
postgres# CREATE USER ${user} PASSWORD '${password}';
postgres# CREATE DATABASE ${db_name} ENCODING 'utf-8';
postgres# ALTER DATABASE ${db_name} OWNER TO ${user};
유저 조회
select * from pg_shadow;
search_path 변경
ALTER ROLE ${name} SET search_path TO ${schema};
데이터베이스 접속
\c <your-database-name>
반응형
'데이터베이스 > Postgresql' 카테고리의 다른 글
postgres 커멘드 라인 정리하기 (0) | 2021.07.15 |
---|---|
: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386' (0) | 2021.07.10 |
만약에 django - postgres test 돌렸을 때 안된다면 (0) | 2021.07.09 |
postgresql search_path 여러개 설정하는 법 (0) | 2021.07.09 |
pgadmin4 (0) | 2021.07.05 |
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- thread
- DRF
- env
- 프로그래머스
- Java
- Pattern
- 백준
- 자바
- 알고리즘
- headers
- postgres
- 그래프
- setattr
- ubuntu
- Python
- 파이썬
- Linux
- PostgreSQL
- BFS
- django
- dockerignore
- 면접
- docker
- Celery
- 2021 KAKAO BLIND RECRUITMENT
- docker-compose
- Collections
- Command Line
- 카카오
- Spring
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
글 보관함