官术网_书友最值得收藏!

Client installation

If you have a PostgreSQL server already installed and you need to interact with it, you need to install the postgresql-client software package. In order to do so, open a Terminal and execute the following command:

sudo apt-get install postgresql-client-11

With the installation of postgresql-client-11, several tools are installed, including the PostgreSQL interactive Terminal (psql), which is a very powerful interactive frontend tool for PostgreSQL. To see the full list of installed programs, you can browse the installation directory. Note that the installation path might vary depending on the installed PostgreSQL version and the operating system:

$ls /usr/lib/postgresql/11/bin/
clusterdb createdb createuser dropdb dropuser pg_basebackup pg_dump pg_dumpall pg_isready pg_receivewal pg_recvlogical pg_restore psql reindexdb vacuumdb

To connect to an existing PostgreSQL server using psql, specify the connection string, which might include the host, the database, the port, and the username.

Another powerful frontend graphical user interface (GUItool is pgAdmin4, which is used for PostgreSQL administration and development. pgAdmin is favored by beginners, while psql can be used for shell scripting.

pgAdmin4 has many features, such as cross-platform, web-based, server, and desktop modes. To install pgAdmin in desktop mode, run the following command:

sudo apt-get install  pgadmin4

To run it, simply execute the following command in the Terminal:

pgadmin4
主站蜘蛛池模板: 金昌市| 松原市| 商水县| 宁晋县| 胶南市| 信宜市| 蓬溪县| 泾川县| 焉耆| 蕉岭县| 依兰县| 张家港市| 桑植县| 丰县| 乌海市| 外汇| 安塞县| 广河县| 万盛区| 德化县| 肃宁县| 定兴县| 长白| 湟中县| 莱阳市| 河南省| 宁晋县| 神农架林区| 民县| 哈巴河县| 兴国县| 鄂尔多斯市| 罗城| 池州市| 剑河县| 通辽市| 宜丰县| 钦州市| 买车| 高阳县| 府谷县|