Postgres Database

You can access to DB via the following command:

[root@ns505185 ~]# psql -U postgres
psql (12.5)
Type "help" for help.

postgres=# \l
                                  List of databases
    Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   
------------+----------+----------+-------------+-------------+-----------------------
 class4_dnl | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 postgres   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
            |          |          |             |             | postgres=CTc/postgres
 template1  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
            |          |          |             |             | postgres=CTc/postgres
(4 rows)

postgres=# \c class4_dnl ;
You are now connected to database "class4_dnl" as user "postgres".
class4_dnl=# 

You can get the list of tables with the following commands:

class4_dnl=# \d+;
                                                                                          List of relations
 Schema |                       Name                       |   Type   |    Owner    |    Size    |                                            Description                                            
--------+--------------------------------------------------+----------+-------------+------------+---------------------------------------------------------------------------------------------------
 public | agent                                            | table    | postgres    | 0 bytes    | 
 public | agent_agent_id_seq                               | sequence | postgres    | 8192 bytes | 
 public | agent_client_client                              | table    | postgres    | 0 bytes    | 
 public | agent_client_client_id_seq                       | sequence | postgres    | 8192 bytes | 
 public | agent_client_client_record                       | table    | postgres    | 8192 bytes | 
 public | agent_client_client_record_record_id_seq         | sequence | postgres    | 8192 bytes | 
 public | agent_clients                                    | table    | postgres    | 0 bytes    | 
 public | agent_clients_id_seq                             | sequence | postgres    | 8192 bytes | 
 public | agent_commission_history                         | table    | postgres    | 8192 bytes | 
 public | agent_commission_history_detail                  | table    | postgres    | 8192 bytes | 
 public | agent_commission_history_detail_id_seq           | sequence | postgres    | 8192 bytes | 
 public | agent_commission_history_history_id_seq          | sequence | postgres    | 8192 bytes | 
 public | agent_commission_payment                         | table    | postgres    | 8192 bytes | 
 public | agent_commission_payment_id_seq                  | sequence | postgres    | 8192 bytes | 
 public | alembic_version                                  | table    | postgres    | 8192 bytes | 
 public | alert_rules                                      | table    | postgres    | 8192 bytes | 
 public | alert_rules_id_seq                               | sequence | postgres    | 8192 bytes | 
 public | alert_rules_log                                  | table    | postgres    | 8192 bytes | 
 public | alert_rules_log_detail                           | table    | postgres    | 8192 bytes | 
 public | alert_rules_log_detail_id_seq                    | sequence | postgres    | 8192 bytes | 
 public | alert_rules_log_id_seq                           | sequence | postgres    | 8192 bytes | 
 public | allowed_sendto_ip                                | table    | postgres    | 0 bytes    | 
 public | allowed_sendto_ip_id_seq                         | sequence | postgres    | 8192 bytes | 
 public | allowed_sendto_ip_record                         | table    | postgres    | 8192 bytes | 
 public | allowed_sendto_ip_record_record_id_seq           | sequence | postgres    | 8192 bytes | 
 public | async_ftp_export                                 | table    | postgres    | 8192 bytes | 

Last updated