postgres의 명령어를 알아보겠습니다.
사용자 목록 조회: \du
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
a | | {}
h | | {}
o | | {}
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
데이터 베이스 목록 조회: \l
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+------------------------
a | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
| | | | | postgres=CTc/postgres +
| | | | | a =CTc/postgres
(1 rows)
테이블 목록 조회: \dt
a =# \dt
List of relations
Schema | Name | Type | Owner
--------+-------------------------------+-------+--------
public | adminpermission | table | a
public | adminprincipal | table | a
테이블 칼럼 정보 확인: \d
oozie=> \d wf_jobs
Table "public.wf_jobs"
Column | Type | Collation | Nullable | Default
--------------------+-----------------------------+-----------+----------+---------
id | character varying(255) | | not null |
app_name | character varying(255) | | |
app_path | character varying(255) | | |
conf | bytea | | |
created_time | timestamp without time zone | | |
end_time | timestamp without time zone | | |
external_id | character varying(255) | | |
group_name | character varying(255) | | |
last_modified_time | timestamp without time zone | | |
log_token | character varying(255) | | |
parent_id | character varying(255) | | |
proto_action_conf | bytea | | |
run | integer | | |
sla_xml | bytea | | |
start_time | timestamp without time zone | | |
status | character varying(255) | | |
user_name | character varying(255) | | |
wf_instance | bytea | | |
Indexes:
"wf_jobs_pkey" PRIMARY KEY, btree (id)
"i_wf_jobs_end_time" btree (end_time)
"i_wf_jobs_external_id" btree (external_id)
"i_wf_jobs_last_modified_time" btree (last_modified_time)
"i_wf_jobs_parent_id" btree (parent_id)
"i_wf_jobs_status" btree (status)
반응형
'데이타베이스' 카테고리의 다른 글
[mariadb] 마리아 DB 설치 와 한글 설정 (0) | 2020.12.23 |
---|---|
[postgres] 존재하는 테이블에 대해서 ERROR: relation "version" does not exist. 오류가 발생할 때 (1) | 2020.11.02 |
[DB] NL(Nested Loop)조인, 소트머지 조인(SMJ), Hash 조인 비교 (0) | 2017.03.28 |
[MySQL] Cannot convert value '0000-00-00 00:00:00' from column 12 to TIMESTAMP 오류 처리 (0) | 2017.03.10 |
[mysql] datetime 객체사이의 시간차 계산을 위한 TIMESTAMPDIFF() 함수 (0) | 2017.01.20 |