Postgres Database
You can access to DB via the following command:
1
[[email protected] ~]# psql -U postgres
2
psql (12.5)
3
Type "help" for help.
4
5
postgres=# \l
6
List of databases
7
Name | Owner | Encoding | Collate | Ctype | Access privileges
8
------------+----------+----------+-------------+-------------+-----------------------
9
class4_dnl | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
10
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
11
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
12
| | | | | postgres=CTc/postgres
13
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
14
| | | | | postgres=CTc/postgres
15
(4 rows)
16
17
postgres=# \c class4_dnl ;
18
You are now connected to database "class4_dnl" as user "postgres".
19
class4_dnl=#
20
Copied!
You can get the list of tables with the following commands:
1
class4_dnl=# \d+;
2
List of relations
3
Schema | Name | Type | Owner | Size | Description
4
--------+--------------------------------------------------+----------+-------------+------------+---------------------------------------------------------------------------------------------------
5
public | agent | table | postgres | 0 bytes |
6
public | agent_agent_id_seq | sequence | postgres | 8192 bytes |
7
public | agent_client_client | table | postgres | 0 bytes |
8
public | agent_client_client_id_seq | sequence | postgres | 8192 bytes |
9
public | agent_client_client_record | table | postgres | 8192 bytes |
10
public | agent_client_client_record_record_id_seq | sequence | postgres | 8192 bytes |
11
public | agent_clients | table | postgres | 0 bytes |
12
public | agent_clients_id_seq | sequence | postgres | 8192 bytes |
13
public | agent_commission_history | table | postgres | 8192 bytes |
14
public | agent_commission_history_detail | table | postgres | 8192 bytes |
15
public | agent_commission_history_detail_id_seq | sequence | postgres | 8192 bytes |
16
public | agent_commission_history_history_id_seq | sequence | postgres | 8192 bytes |
17
public | agent_commission_payment | table | postgres | 8192 bytes |
18
public | agent_commission_payment_id_seq | sequence | postgres | 8192 bytes |
19
public | alembic_version | table | postgres | 8192 bytes |
20
public | alert_rules | table | postgres | 8192 bytes |
21
public | alert_rules_id_seq | sequence | postgres | 8192 bytes |
22
public | alert_rules_log | table | postgres | 8192 bytes |
23
public | alert_rules_log_detail | table | postgres | 8192 bytes |
24
public | alert_rules_log_detail_id_seq | sequence | postgres | 8192 bytes |
25
public | alert_rules_log_id_seq | sequence | postgres | 8192 bytes |
26
public | allowed_sendto_ip | table | postgres | 0 bytes |
27
public | allowed_sendto_ip_id_seq | sequence | postgres | 8192 bytes |
28
public | allowed_sendto_ip_record | table | postgres | 8192 bytes |
29
public | allowed_sendto_ip_record_record_id_seq | sequence | postgres | 8192 bytes |
30
public | async_ftp_export | table | postgres | 8192 bytes |
31
Copied!
Copy link