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

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
主站蜘蛛池模板: 冷水江市| 聂拉木县| 鄂托克旗| 怀宁县| 郴州市| 惠来县| 金川县| 柳州市| 遂宁市| 泉州市| 盐山县| 营山县| 罗山县| 盖州市| 龙岩市| 韩城市| 台江县| 泰兴市| 朔州市| 太仆寺旗| 镇雄县| 二连浩特市| 资阳市| 车险| 滨州市| 察隅县| 晋城| 奉化市| 洪江市| 汶川县| 庄浪县| 满洲里市| 呼伦贝尔市| 漯河市| 平果县| 光山县| 德庆县| 黑水县| 南阳市| 新河县| 科技|