{"id":27319,"date":"2023-08-18T10:57:33","date_gmt":"2023-08-18T08:57:33","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=27319"},"modified":"2023-08-18T10:57:33","modified_gmt":"2023-08-18T08:57:33","slug":"simplifying-postgresql-management-a-guide-to-install-and-use-pgcli","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/","title":{"rendered":"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Managing databases is a crucial aspect for a DBA, and PostgreSQL is a powerful open-source relational database management system that is widely used. To interact with a PostgreSQL database, DBA and developers often rely on command-line tools. The default tool that is used is psql. What if I told you that you can simplify the interaction with your database with a simple tool ? One such tool is pgcli. In this blog, I&#8217;ll guide you through the process of installing and using pgcli to make your PostgreSQL database management tasks more efficient and enjoyable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-pgcli\">What is pgcli?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">pgcli is a command-line interface for PostgreSQL databases that provides a user-friendly alternative to the default psql command-line tool. It offers features such as syntax highlighting and auto-completion.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-installation\">Installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting the installation process, please note that I\u2019m running PostgreSQL 16beta1 installed from sources, running on opensuse 15.4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Installing pgcli requires Python, so make sure you have Python installed on your system.<br>There are various way of installing Python so I\u2019ll not explain it now, but you can check if it\u2019s installed with this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>14:27:21 postgres@localhost:\/home\/postgres\/ &#091;] which pip\n\/usr\/bin\/pip<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s how to install pgcli using the Python package manager, pip:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>16:27:28 postgres@localhost:\/home\/postgres\/ &#091;] pip install pgcli<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command will fetch the necessary packages and install pgcli on your system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-connecting-to-a-postgresql-database\">Connecting to a PostgreSQL Database<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have pgcli installed, you can easily connect to a PostgreSQL database using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>15:31:06 postgres@localhost:\/home\/postgres\/ &#091;PG16] pgcli -h localhost -p 5432 -U postgres -d postgres\nServer: PostgreSQL 16beta1 dbi services build\nVersion: 3.4.1\nHome: http:\/\/pgcli.com\npostgres@localhost:postgres&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can get information about the possible parameters to use with the command pgcli \u2013help<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"638\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001.png\" alt=\"\" class=\"wp-image-27361\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001.png 780w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001-300x245.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001-768x628.png 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;re connected, you&#8217;ll see the pgcli prompt, which indicates that you are now working within the pgcli environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-using-pgcli\">Using pgcli<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">pgcli offers several advantages over the default PostgreSQL command-line tool:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Syntax Highlighting: SQL commands you enter are color-coded for easier readability.<br>2. Auto-Completion: pgcli provides suggestions for table and column names<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"956\" height=\"133\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image003.png\" alt=\"\" class=\"wp-image-27362\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image003.png 956w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image003-300x42.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image003-768x107.png 768w\" sizes=\"auto, (max-width: 956px) 100vw, 956px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3. Multi-Line Editing: Unlike psql, you can write and edit multi-line queries with ease. (press F3 to enable or disable multi-line editing)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"387\" height=\"540\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image005.png\" alt=\"\" class=\"wp-image-27363\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image005.png 387w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image005-215x300.png 215w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4. Command Help: Typing `\\?` gives you access to a list of available commands and shortcuts within pgcli.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"775\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image008.png\" alt=\"\" class=\"wp-image-27364\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image008.png 738w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image008-286x300.png 286w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">5. Configurability: You can customize the behavior and appearance of pgcli using its configuration file. The file is located in ~\/.config\/pgcli\/config.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-basic-commands-and-usage\">Basic Commands and Usage<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here are some basic commands to get you started with pgcli:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211; To list all available databases:<br>\\l<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"240\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image009.png\" alt=\"\" class=\"wp-image-27365\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image009.png 880w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image009-300x82.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image009-768x209.png 768w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Also, note the differences with the default psql cli:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"166\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image011-1024x166.png\" alt=\"\" class=\"wp-image-27366\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image011-1024x166.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image011-300x49.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image011-768x124.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image011.png 1305w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211; To switch to a different database:<br>\/c &lt;database_name&gt;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"542\" height=\"80\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image013.png\" alt=\"\" class=\"wp-image-27367\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image013.png 542w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image013-300x44.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Autocompletion proposing you the list of available databases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember, you can also use regular SQL commands to interact with your databases as well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">pgcli is a great tool that makes your PostgreSQL database management experience easier by providing a more interactive and intuitive command-line interface. For people like me, who are keen to forget the name of their PostgreSQL tables, autocompletion is a wonderful tool. By following the installation and usage guide outlined in this blog post, I hope to help you make your life easier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can find more information on pgcli on the website and the GitHub of the tool:<br><a href=\"https:\/\/github.com\/dbcli\/pgcli\">https:\/\/github.com\/dbcli\/pgcli<\/a><br><a href=\"https:\/\/www.pgcli.com\/install\">https:\/\/www.pgcli.com\/install<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Managing databases is a crucial aspect for a DBA, and PostgreSQL is a powerful open-source relational database management system that is widely used. To interact with a PostgreSQL database, DBA and developers often rely on command-line tools. The default tool that is used is psql. What if I told you that you can simplify the&hellip;&nbsp;<\/p>\n","protected":false},"author":87,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133,83],"tags":[1142],"class_list":["post-27319","post","type-post","status-publish","format-standard","category-database","category-postgresql","tag-management"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.8 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Simplifying PostgreSQL Management: A Guide to Install and Use pgcli - dbi services Blog<\/title>\n<meta name=\"description\" content=\"Learn how to simplify your PostgreSQL database management using pgcli, a user-friendly command-line tool. This guide covers the installation and usage of pgcli.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli\" \/>\n<meta property=\"og:description\" content=\"Learn how to simplify your PostgreSQL database management using pgcli, a user-friendly command-line tool. This guide covers the installation and usage of pgcli.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-18T08:57:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001.png\" \/>\n\t<meta property=\"og:image:width\" content=\"780\" \/>\n\t<meta property=\"og:image:height\" content=\"638\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joan Frey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joan Frey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/\"},\"author\":{\"name\":\"Joan Frey\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/565fa40326c9a1329bcf424186e01a04\"},\"headline\":\"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli\",\"datePublished\":\"2023-08-18T08:57:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/\"},\"wordCount\":524,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/image001.png\",\"keywords\":[\"Management\"],\"articleSection\":[\"Database\",\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/\",\"name\":\"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/image001.png\",\"datePublished\":\"2023-08-18T08:57:33+00:00\",\"description\":\"Learn how to simplify your PostgreSQL database management using pgcli, a user-friendly command-line tool. This guide covers the installation and usage of pgcli.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/image001.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/image001.png\",\"width\":780,\"height\":638},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/565fa40326c9a1329bcf424186e01a04\",\"name\":\"Joan Frey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/FRJ_web-min-scaled.jpg\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/FRJ_web-min-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/FRJ_web-min-scaled.jpg\",\"caption\":\"Joan Frey\"},\"description\":\"Joan Frey has more than 8 years of experience in the IT sector, including 5 years as a database and Linux consultant. He is specialized in PostgreSQL high availability (Patroni, etcd, HAProxy, Keepalived) and also manages MariaDB and MySQL environments. His knowledge includes Linux (RHEL, SLES), Windows Server, backup and restore strategies (pgBackRest, mariabackup), Ansible automation, as well as development in Python, Go, TypeScript and SQL. Since 2021, he has been working at dbi services, where he installs, supports and documents database infrastructures for customers, often under SLA contracts, and coaches their internal teams. He also contributes to internal tools such as DMK (Database Management Kit), the Resource Planning ERP and the Yak cloud tool. Before joining dbi services, he was an Analyst Developer Intern at Euro Information D\u00e9veloppement (France) in Strasbourg. His branch related experience includes banking, fintech, payment services, telecommunications, aviation, watchmaking, public administration, energy, insurance, pharmaceuticals and public transport.\",\"sameAs\":[\"ree years of experience in the IT sector, specializing in C and C# development, with additional knowledge of Linux and SQL. Prior to dbi services, he was an Analyst Developer Intern at Euro Information D\u00e9veloppement in Strasbourg and an IT Help Desk intern at EuroAirport. He holds a computer engineering degree specializing in information systems from the University of Technology of Belfort-Montb\u00e9liard (UTBM). His industry experience includes banking and aviation.\"],\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/joan-frey\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli - dbi services Blog","description":"Learn how to simplify your PostgreSQL database management using pgcli, a user-friendly command-line tool. This guide covers the installation and usage of pgcli.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/","og_locale":"en_US","og_type":"article","og_title":"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli","og_description":"Learn how to simplify your PostgreSQL database management using pgcli, a user-friendly command-line tool. This guide covers the installation and usage of pgcli.","og_url":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2023-08-18T08:57:33+00:00","og_image":[{"width":780,"height":638,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001.png","type":"image\/png"}],"author":"Joan Frey","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Joan Frey","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/"},"author":{"name":"Joan Frey","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/565fa40326c9a1329bcf424186e01a04"},"headline":"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli","datePublished":"2023-08-18T08:57:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/"},"wordCount":524,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001.png","keywords":["Management"],"articleSection":["Database","PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/","url":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/","name":"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001.png","datePublished":"2023-08-18T08:57:33+00:00","description":"Learn how to simplify your PostgreSQL database management using pgcli, a user-friendly command-line tool. This guide covers the installation and usage of pgcli.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/08\/image001.png","width":780,"height":638},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/simplifying-postgresql-management-a-guide-to-install-and-use-pgcli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Simplifying PostgreSQL Management: A Guide to Install and Use pgcli"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/565fa40326c9a1329bcf424186e01a04","name":"Joan Frey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/FRJ_web-min-scaled.jpg","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/FRJ_web-min-scaled.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/FRJ_web-min-scaled.jpg","caption":"Joan Frey"},"description":"Joan Frey has more than 8 years of experience in the IT sector, including 5 years as a database and Linux consultant. He is specialized in PostgreSQL high availability (Patroni, etcd, HAProxy, Keepalived) and also manages MariaDB and MySQL environments. His knowledge includes Linux (RHEL, SLES), Windows Server, backup and restore strategies (pgBackRest, mariabackup), Ansible automation, as well as development in Python, Go, TypeScript and SQL. Since 2021, he has been working at dbi services, where he installs, supports and documents database infrastructures for customers, often under SLA contracts, and coaches their internal teams. He also contributes to internal tools such as DMK (Database Management Kit), the Resource Planning ERP and the Yak cloud tool. Before joining dbi services, he was an Analyst Developer Intern at Euro Information D\u00e9veloppement (France) in Strasbourg. His branch related experience includes banking, fintech, payment services, telecommunications, aviation, watchmaking, public administration, energy, insurance, pharmaceuticals and public transport.","sameAs":["ree years of experience in the IT sector, specializing in C and C# development, with additional knowledge of Linux and SQL. Prior to dbi services, he was an Analyst Developer Intern at Euro Information D\u00e9veloppement in Strasbourg and an IT Help Desk intern at EuroAirport. He holds a computer engineering degree specializing in information systems from the University of Technology of Belfort-Montb\u00e9liard (UTBM). His industry experience includes banking and aviation."],"url":"https:\/\/www.dbi-services.com\/blog\/author\/joan-frey\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/27319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=27319"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/27319\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=27319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=27319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=27319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}