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

  • Learning PostgreSQL 11
  • Salahaldin Juba Andrey Volkov
  • 211字
  • 2021-07-02 13:11:45

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
主站蜘蛛池模板: 中牟县| 宜黄县| 汤原县| 石棉县| 双鸭山市| 青龙| 甘泉县| 徐闻县| 镇赉县| 广州市| 盐城市| 阿拉尔市| 那曲县| 茌平县| 化隆| 瑞昌市| 上栗县| 绵竹市| 永济市| 许昌县| 综艺| 南宫市| 东安县| 惠东县| 定安县| 宜宾县| 栾城县| 卢湾区| 仙居县| 东明县| 驻马店市| 喀喇沁旗| 桦甸市| 涞源县| 昌江| 阜康市| 新宁县| 从化市| 宁陵县| 汉沽区| 剑川县|