Skip to content

pgii postgreSql Cli Help document

jiazhi.xue edited this page Mar 24, 2023 · 14 revisions

Description

A postgreSql Cli tool

imi License

pgii is a PostgreSql cli tool. PostgreSql can be developed in CMD or Golang.

  • ** Cross-platform ** : can be compiled under multiple platforms, cross-platform use;
  • ** Zero learning cost ** : similar to MySQL Cli instructions, familiar with mysql operations on the quick hand;
  • ** Interactive Console**: console through the command line.
  • ** Like to point a star**.

1. Log in

1.1 Command description

cmd:

./pgii [-h|--host] [-u|--user] [-p|--password] [-d|--db] [--port]
  -  [- h | -- host] postgresql database address # eg: -h localhost | - host = localhost
  -  [-u | - user] database username # eg: -u postgres | - user = postgres
  -  [-p | -- password] database password # eg: -p postgres | - password = postgres
  -  [-d | - db] choose the default database for postgres # eg: -d postgres | - db = postgres
  -  [--port] Specifies port # eg: --port=5432

1.2 Command example

image

  1. Instruction description

2.1 use instruction

2.1.1 use db | database

Function Description

Function: Used to select a database. After data is selected, you can run show db 
          or show selectdb to view the selected database
Usage:    use  db|database <dbName>;
          <dbName>   Data name

Instruction example

image
Run the preceding command to select the database and run the "show db" command. You can view the currently selected database
image Run the "show selectdb" command to select the database. You can view the currently selected database
image

2.1.2 use sc|schema

Function Description

Function: This command is used to select a database schema. After selecting a database schema, 
          run the show sc or show schema command to view the selected schema
Usage:    use sc|schema <schemaName>
          schemaName Schema name

instruction Example

image
Run the preceding command to select the database mode and run the show sc command. You can view the currently selected database schema
image
Run the show selectdb command to select the database mode. You can view the currently selected database schema
image