Name | Return Type | Description |
---|---|---|
current_catalog |
name | name of current database (called "catalog" in the SQL standard) |
current_database() |
name | name of current database |
current_query() |
text | text of the currently executing query, as submitted by the client (might contain more than one statement) |
current_schema [()] |
name | name of current schema |
current_schemas(boolean) |
name[] | names of schemas in search path, optionally including implicit schemas |
current_user |
name | user name of current execution context |
inet_client_addr() |
inet | address of the remote connection |
inet_client_port() |
int | port of the remote connection |
inet_server_addr() |
inet | address of the local connection |
inet_server_port() |
int | port of the local connection |
pg_backend_pid() |
int | Process ID of the server process attached to the current session |
pg_conf_load_time() |
timestamp with time zone | configuration load time |
pg_is_other_temp_schema(oid) |
boolean | is schema another session's temporary schema? |
pg_listening_channels() |
setof text | channel names that the session is currently listening on |
pg_my_temp_schema() |
oid | OID of session's temporary schema, or 0 if none |
pg_postmaster_start_time() |
timestamp with time zone | server start time |
pg_trigger_depth() |
int | current nesting level of PostgreSQL triggers (0 if not called, directly or indirectly, from inside a trigger) |
session_user |
name | session user name |
user |
name | equivalent to current_user |
version() |
text | PostgreSQL version information |
ㅇ 현재 PostgreSQL 사용 Port
postgres=# SELECT inet_server_port();
ㅇ 현재 Database
postgres=# SELECT current_database();
ㅇ 현재 접속 User
postgres=# SELECT current_user;
ㅇ 현재 Server IP
postgres=# SELECT inet_server_addr();
ㅇ 현재 PostgreSQL Version
postgres=# SELECT version();
ㅇ 현재 PostgreSQL 시간
postgres=# SELECT current_time;
ㅇ 현재 PostgreSQL의 시작 시간
postgres=# SELECT pg_postmaster_start_time();
ㅇ 현재 PostgreSQL 에 존재하는 Database
postgres=# SELECT datname from pg_database;
출처 : http://dbrang.tistory.com/750
by.백준
'2. DBMS이야기 > 01. PostgreSQL' 카테고리의 다른 글
PostgreSQL Privileges Test 3 (0) | 2014.08.18 |
---|---|
PostgreSQL Recovery Flow (0) | 2014.08.15 |
PostgreSQL Privileges Test 2 (0) | 2014.08.11 |
[PostgreSQL Admin] 3.Server Configuration : Parameter 종류(Checkpoint&Archiving) (0) | 2014.08.09 |
[PostgreSQL] postgresql.conf 파라미터 설정(8.0) (0) | 2014.08.08 |