{"id":9759,"date":"2022-10-24T21:26:12","date_gmt":"2022-10-24T19:26:12","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=9759"},"modified":"2022-10-24T21:26:14","modified_gmt":"2022-10-24T19:26:14","slug":"6-popular-postgresql-cli-libraries","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2022\/10\/24\/6-popular-postgresql-cli-libraries\/","title":{"rendered":"6 Popular PostgreSQL CLI Libraries"},"content":{"rendered":"<h2><em><a href=\"https:\/\/morioh.com\">6 Popular PostgreSQL CLI Libraries<\/a><\/em><\/h2>\n<blockquote>\n<ul>\n<li><strong>pgcli <\/strong>&#8211; Postgres CLI with autocompletion and syntax highlighting<\/li>\n<li><strong>pgsh <\/strong>&#8211; Branch your PostgreSQL Database like Git<\/li>\n<li><strong>psql <\/strong>&#8211; The built-in PostgreSQL CLI client<\/li>\n<li><strong>psql2csv<\/strong> &#8211; Run a query in psql and output the result as CSV<\/li>\n<li><strong>nancy <\/strong>&#8211; The Nancy CLI is a unified way to manage automated database experiments either in clouds or on-premise<\/li>\n<li><strong>schemaspy <\/strong>&#8211; SchemaSpy is a JAVA JDBC-compliant tool for generating your database to HTML documentation, including Entity Relationship diagrams<\/li>\n<\/ul>\n<h2><strong>What is PostgreSQL?<\/strong><\/h2>\n<p>PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads. The origins of PostgreSQL date back to 1986 as part of the <a href=\"https:\/\/morioh.com\/redirect?id=632d16b4c7ca7aed27f4d94e&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2Fcurrent%2Fhistory.html\" target=\"_blank\" rel=\"noopener nofollow\"><strong>POSTGRES<\/strong><\/a> project at the University of California at Berkeley and has more than 30 years of active development on the core platform.<\/p>\n<p>PostgreSQL has earned a strong reputation for its proven architecture, reliability, data integrity, robust feature set, extensibility, and the dedication of the open source community behind the software to consistently deliver performant and innovative solutions. PostgreSQL runs on <a href=\"https:\/\/morioh.com\/redirect?id=632d16b4c7ca7aed27f4d94e&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fwww.postgresql.org%2Fdownload%2F\" target=\"_blank\" rel=\"noopener nofollow\"><strong>all major operating systems<\/strong><\/a>, has been <a href=\"https:\/\/morioh.com\/redirect?id=632d16b4c7ca7aed27f4d94e&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FACID\" target=\"_blank\" rel=\"noopener nofollow\"><strong>ACID<\/strong><\/a>-compliant since 2001, and has powerful add-ons such as the popular <a href=\"https:\/\/morioh.com\/redirect?id=632d16b4c7ca7aed27f4d94e&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fpostgis.net%2F\" target=\"_blank\" rel=\"noopener nofollow\"><strong>PostGIS<\/strong><\/a> geospatial database extender. It is no surprise that PostgreSQL has become the open source relational database of choice for many people and organisations.<\/p>\n<hr \/>\n<h2>10 Popular PostgreSQL CLI Libraries<\/h2>\n<ol>\n<li><strong>pgcli<\/strong><\/li>\n<\/ol>\n<p>Postgres CLI with autocompletion and syntax highlighting<\/p>\n<p>This is a postgres client that does auto-completion and syntax highlighting.<\/p>\n<h2><strong>Quick Start<\/strong><\/h2>\n<p>If you already know how to install python packages, then you can simply do:<\/p>\n<pre class=\"  language-bash\" tabindex=\"0\"><code class=\"\" data-line=\"\">$ pip &lt;span class=&quot;token function&quot;&gt;install&lt;\/span&gt; -U pgcli\n\nor\n\n$ &lt;span class=&quot;token function&quot;&gt;sudo&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;apt-get&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;\/span&gt; pgcli &lt;span class=&quot;token comment&quot;&gt;# Only on Debian based Linux (e.g. Ubuntu, Mint, etc)&lt;\/span&gt;\n$ brew &lt;span class=&quot;token function&quot;&gt;install&lt;\/span&gt; pgcli  &lt;span class=&quot;token comment&quot;&gt;# Only on macOS&lt;\/span&gt;\n<\/code><\/pre>\n<p>If you don&#8217;t know how to install python packages, please check the <a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fgithub.com%2Fdbcli%2Fpgcli%23detailed-installation-instructions\" target=\"_blank\" rel=\"noopener nofollow\">detailed instructions<\/a>.<\/p>\n<h2><strong>Usage<\/strong><\/h2>\n<pre class=\"  language-bash\" tabindex=\"0\"><code class=\"\" data-line=\"\">$ pgcli &lt;span class=&quot;token punctuation&quot;&gt;[&lt;\/span&gt;database_name&lt;span class=&quot;token punctuation&quot;&gt;]&lt;\/span&gt;\n\nor\n\n$ pgcli postgresql:\/\/&lt;span class=&quot;token punctuation&quot;&gt;[&lt;\/span&gt;user&lt;span class=&quot;token punctuation&quot;&gt;[&lt;\/span&gt;:password&lt;span class=&quot;token punctuation&quot;&gt;]&lt;\/span&gt;@&lt;span class=&quot;token punctuation&quot;&gt;]&lt;\/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;\/span&gt;netloc&lt;span class=&quot;token punctuation&quot;&gt;]&lt;\/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;\/span&gt;:port&lt;span class=&quot;token punctuation&quot;&gt;]&lt;\/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;\/span&gt;\/dbname&lt;span class=&quot;token punctuation&quot;&gt;]&lt;\/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;\/span&gt;?extra&lt;span class=&quot;token operator&quot;&gt;=&lt;\/span&gt;value&lt;span class=&quot;token punctuation&quot;&gt;[&lt;\/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;&lt;\/span&gt;&lt;span class=&quot;token assign-left variable&quot;&gt;other&lt;\/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;\/span&gt;other-value&lt;span class=&quot;token punctuation&quot;&gt;]&lt;\/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;\/span&gt;\n<\/code><\/pre>\n<p>Examples:<\/p>\n<pre class=\"  language-bash\" tabindex=\"0\"><code class=\"\" data-line=\"\">$ pgcli local_database\n\n$ pgcli postgres:\/\/amjith:pa&lt;span class=&quot;token variable&quot;&gt;$&lt;\/span&gt;w0rd@example.com:5432\/app_db?sslmode&lt;span class=&quot;token operator&quot;&gt;=&lt;\/span&gt;verify-ca&lt;span class=&quot;token operator&quot;&gt;&amp;&lt;\/span&gt;&lt;span class=&quot;token assign-left variable&quot;&gt;sslrootcert&lt;\/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;\/span&gt;\/myrootcert<\/code><\/pre>\n<h2><a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fgithub.com%2Fdbcli%2Fpgcli\" target=\"_blank\" rel=\"noopener nofollow\">View on GitHub<\/a><\/h2>\n<hr \/>\n<h2>2. &nbsp;<strong>pgsh<\/strong><\/h2>\n<p>Branch your PostgreSQL Database like Git<\/p>\n<p>Finding database migrations painful to work with? Switching contexts a chore? <a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fgithub.com%2Fsastraxi%2Fpgsh%2Fblob%2Fmaster%2Fdocs%2Fpull-requests.md\" target=\"_blank\" rel=\"noopener nofollow\">Pull requests<\/a> piling up? <code class=\"\" data-line=\"\">pgsh<\/code> helps by managing a connection string in your <code class=\"\" data-line=\"\">.env<\/code> file and allows you to <a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fgithub.com%2Fsastraxi%2Fpgsh%2Fblob%2Fmaster%2Fdocs%2Fbranching.md\" target=\"_blank\" rel=\"noopener nofollow\">branch your database<\/a> just like you branch with git.<\/p>\n<hr \/>\n<h2><strong>Prerequisites<\/strong><\/h2>\n<p>There are only a couple requirements:<\/p>\n<ul>\n<li>your project reads its database configuration from the environment<\/li>\n<li>it uses a <code class=\"\" data-line=\"\">.env<\/code> file to do so in development.<\/li>\n<\/ul>\n<blockquote><p>See <a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fdotenv\" target=\"_blank\" rel=\"noopener nofollow\">dotenv<\/a> for more details, and <a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2F12factor.net%2F\" target=\"_blank\" rel=\"noopener nofollow\">The Twelve-Factor App<\/a> for why this is a best practice.<\/p><\/blockquote>\n<figure class=\"table\">\n<table>\n<thead>\n<tr>\n<th><strong>Language \/ Framework<\/strong><\/th>\n<th><code class=\"\" data-line=\"\">&lt;strong&gt;.env&lt;\/strong&gt;<\/code><strong> solution<\/strong><\/th>\n<th><strong>Maturity<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>javascript<\/td>\n<td><a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fdotenv\" target=\"_blank\" rel=\"noopener nofollow\">dotenv<\/a><\/td>\n<td>high<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>pgsh can help even more if you use <a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fknexjs.org%2F\" target=\"_blank\" rel=\"noopener nofollow\">knex<\/a> for migrations.<\/p>\n<h2><strong>Installation<\/strong><\/h2>\n<ol>\n<li><code class=\"\" data-line=\"\">yarn global add pgsh<\/code> to make the <code class=\"\" data-line=\"\">pgsh<\/code> command available everywhere<\/li>\n<li><code class=\"\" data-line=\"\">pgsh init<\/code> to create a <code class=\"\" data-line=\"\">.pgshrc<\/code> config file in your project folder, beside your <code class=\"\" data-line=\"\">.env<\/code> file (see <code class=\"\" data-line=\"\">src\/pgshrc\/default.js<\/code> for futher configuration)<\/li>\n<li>You can now run <code class=\"\" data-line=\"\">pgsh<\/code> anywhere in your project directory (try <code class=\"\" data-line=\"\">pgsh -a<\/code>!)<\/li>\n<li>It is recommended to check your <code class=\"\" data-line=\"\">.pgshrc<\/code> into version control. <a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fgithub.com%2Fsastraxi%2Fpgsh%2Fblob%2Fmaster%2Fdocs%2Fpgshrc.md\" target=\"_blank\" rel=\"noopener nofollow\">Why?<\/a><\/li>\n<\/ol>\n<h2><a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fgithub.com%2Fsastraxi%2Fpgsh\" target=\"_blank\" rel=\"noopener nofollow\">View on GitHub<\/a><\/h2>\n<hr \/>\n<h2>3. <strong>psql<\/strong><\/h2>\n<p>psql is a terminal-based front-end to PostgreSQL. It enables you to type in queries interactively, issue them to PostgreSQL, and see the query results. Alternatively, input can be from a file or from command line arguments. In addition, psql provides a number of meta-commands and various shell-like features to facilitate writing scripts and automating a wide variety of tasks.<\/p>\n<h2><a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2Fcurrent%2Fapp-psql.html\" target=\"_blank\" rel=\"noopener nofollow\">View on source<\/a><\/h2>\n<hr \/>\n<h2>4. &nbsp;<strong>psql2csv<\/strong><\/h2>\n<p>Run a query in psql and output the result as CSV.<\/p>\n<p><strong>Installation<\/strong><\/p>\n<h3><strong>Mac OS X<\/strong><\/h3>\n<p>psql2csv is available on <a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=http%3A%2F%2Fbrew.sh%2F\" target=\"_blank\" rel=\"noopener nofollow\">Homebrew<\/a>.<\/p>\n<pre class=\"  language-plaintext\" tabindex=\"0\"><code class=\"\" data-line=\"\">$ brew install psql2csv\n<\/code><\/pre>\n<h3><strong>Manual<\/strong><\/h3>\n<p>Grab the file <code class=\"\" data-line=\"\">psql2csv<\/code>, put in somewhere in your <code class=\"\" data-line=\"\">$PATH<\/code>, and make it executable:<\/p>\n<pre class=\"  language-plaintext\" tabindex=\"0\"><code class=\"\" data-line=\"\">$ curl https:\/\/raw.githubusercontent.com\/fphilipe\/psql2csv\/master\/psql2csv &gt; \/usr\/local\/bin\/psql2csv &amp;&amp; chmod +x \/usr\/local\/bin\/psql2csv\n<\/code><\/pre>\n<h2><strong>Usage<\/strong><\/h2>\n<pre class=\"  language-plaintext\" tabindex=\"0\"><code class=\"\" data-line=\"\">psql2csv [OPTIONS] &lt; QUERY\npsql2csv [OPTIONS] QUERY\n<\/code><\/pre>\n<h2><strong>Options<\/strong><\/h2>\n<p>The query is assumed to be the contents of STDIN, if present, or the last argument. All other arguments are forwarded to psql except for these:<\/p>\n<pre class=\"  language-plaintext\" tabindex=\"0\"><code class=\"\" data-line=\"\">-?, --help                 show this help, then exit\n--delimiter=DELIMITER      set the field delimiter (default: ,)\n--quote=QUOTE              set the quote delimiter (default: &quot;)\n--escape=ESCAPE            set the escape character (default: QUOTE)\n--null=NULL                set the string representing NULL; printed without quotes (default: empty string)\n--force-quote=FORCE_QUOTE  set the columns to be force quoted; comma separated list of columns or * for all (default: none)\n--encoding=ENCODING        set the output encoding; Excel likes latin1 (default: UTF8)\n--no-header                do not output a header\n--timezone=TIMEZONE        set the timezone config before running the query\n--search-path=SEARCH_PATH  set the search_path config before running the query\n--dry-run                  print the COPY statement that would be run without actually running it<\/code><\/pre>\n<h2><a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fgithub.com%2Ffphilipe%2Fpsql2csv\" target=\"_blank\" rel=\"noopener nofollow\">View on GitHub<\/a><\/h2>\n<hr \/>\n<h2>5. &nbsp;Nancy<\/h2>\n<p>Nancy helps to conduct automated database experiments.<\/p>\n<p>The Nancy Command Line Interface is a unified way to manage automated database experiments either in clouds or on-premise.<\/p>\n<h3>What is a Database Experiment?<\/h3>\n<p>Database experiment is a set of actions performed to test<\/p>\n<ul>\n<li>(a) specified SQL queries (&#8220;workload&#8221;)<\/li>\n<li>(b) on specified machine \/ OS \/ Postgres version (&#8220;environment&#8221;)<\/li>\n<li>(c) against specified database (&#8220;object&#8221;)<\/li>\n<li>(d) with an optional change \u2013 some DDL or config change (&#8220;target&#8221; or &#8220;delta&#8221;).<\/li>\n<\/ul>\n<p>Two main goals for any database experiment:<\/p>\n<ul>\n<li>(1) validation \u2013 check that the specified workload is valid,<\/li>\n<li>(2) benchmark \u2013 perform deep SQL query analysis.<\/li>\n<\/ul>\n<p>Database experiments are needed when you:<\/p>\n<ul>\n<li>add or remove indexes;<\/li>\n<li>for a new DB schema change, want to validate it and estimate migration time;<\/li>\n<li>want to verify some query optimization ideas;<\/li>\n<li>tune database configuration parameters;<\/li>\n<li>do capacity planning and want to stress-test your DB in some environment;<\/li>\n<li>plan to upgrade your DBMS to a new major version;<\/li>\n<li>want to train ML model related to DB optimization.<\/li>\n<\/ul>\n<h2><a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fgitlab.com%2Fpostgres-ai%2Fnancy\" target=\"_blank\" rel=\"noopener nofollow\">View on Gitlab<\/a><\/h2>\n<hr \/>\n<h2>6. &nbsp;SchemaSpy<\/h2>\n<blockquote><p>Please support the project by simply putting a Github star. Share this library with friends on Twitter and everywhere else you can.<\/p><\/blockquote>\n<blockquote><p>If you notice a bug or have something not working, please report an issue, we&#8217;ll try to fix it as soon as possible. More documentation and features expected to be soon. Feel free to contribute.<\/p><\/blockquote>\n<p>This is a new code repository for SchemaSpy tool initially created and maintained <a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=http%3A%2F%2Fschemaspy.sourceforge.net%2F\" target=\"_blank\" rel=\"noopener nofollow\">by John Currier<\/a>. I personally believe that work on SchemaSpy should be continued, and a lot of still existing issues should be resolved. Last released version of the SchemaSpy was in 2010, and I have a plan to change this.<\/p>\n<p>I would like to say thank you to John Currier for the invention of this database entity-relationship (ER) diagram generator.<\/p>\n<p>My plan is to release new SchemaSpy version and concentrate on refactoring and improving it.<\/p>\n<p>In new <strong>SchemaSpy 6.0<\/strong> version you will find:<\/p>\n<p>Absolutely new amazing look and feel generated content<\/p>\n<p>You can very easily change SchemaSpy theme because all of the logic was moved outside the Java code<\/p>\n<p>Speed of database generation improved a little<\/p>\n<p>Generation of the html pages was changed from plain concatenated text in Java code to Moustache engine<\/p>\n<p>In database comments you can use Markdown language what should improve user experience from reading your database documentation<\/p>\n<p>You can also easily create in database comments links to the tables and columns<\/p>\n<p>More detail will came in next days plus I have plan to start working on all not resolved issues.<\/p>\n<h2><a href=\"https:\/\/morioh.com\/redirect?id=632d1c1234ed7b708447ac56&amp;own=602e3674481abd0fe763fa3f&amp;l=https%3A%2F%2Fgithub.com%2Fschemaspy%2Fschemaspy\" target=\"_blank\" rel=\"noopener nofollow\">View on GitHub<\/a><\/h2>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">6 Popular PostgreSQL CLI Libraries pgcli &#8211; Postgres CLI with autocompletion and syntax highlighting pgsh &#8211; Branch your PostgreSQL Database like Git psql &#8211; The built-in PostgreSQL CLI client psql2csv &#8211; Run a query in psql and output the result as CSV nancy &#8211; The Nancy CLI is a unified way to manage automated database&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2022\/10\/24\/6-popular-postgresql-cli-libraries\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[72],"tags":[],"class_list":["post-9759","post","type-post","status-publish","format-standard","hentry","category-documentations"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2xp","jetpack-related-posts":[{"id":3743,"url":"https:\/\/monodes.com\/predaelli\/2018\/02\/03\/postgres-hidden-gems-craig-kerstiens\/","url_meta":{"origin":9759,"position":0},"title":"Postgres hidden gems &#8211; Craig Kerstiens","author":"Paolo Redaelli","date":"2018-02-03","format":false,"excerpt":"citext I've always been fond of PostgreSQL, now this Postgres hidden gems - Craig Kerstiens shows its smart features even more! There are many interesting features of Postgresql that I didn't knew, as I haven't actually used it for a while Postgres has a rich set of features, even when\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11818,"url":"https:\/\/monodes.com\/predaelli\/2024\/07\/27\/speeding-up-index-creation-in-postgresql\/","url_meta":{"origin":9759,"position":1},"title":"Speeding up index creation in PostgreSQL","author":"Paolo Redaelli","date":"2024-07-27","format":false,"excerpt":"In this blog we are talking about indexes. Speeding up index creation in PostgreSQL is one of the main topic. Source: Speeding up index creation in PostgreSQL","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9404,"url":"https:\/\/monodes.com\/predaelli\/2022\/05\/30\/in-a-single-file\/","url_meta":{"origin":9759,"position":2},"title":"In a single file!","author":"Paolo Redaelli","date":"2022-05-30","format":false,"excerpt":"Adminer \u00ad A full-featured database management tool written in PHP, in a single PHP file Adminer is available for MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Elasticsearch, MongoDB and others via plugin.","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/monodes.com\/predaelli\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8190,"url":"https:\/\/monodes.com\/predaelli\/2021\/02\/21\/typeorm\/","url_meta":{"origin":9759,"position":3},"title":"Typeorm","author":"Paolo Redaelli","date":"2021-02-21","format":"link","excerpt":"typeorm.io is Object\u2013relational mapping for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10822,"url":"https:\/\/monodes.com\/predaelli\/2023\/09\/26\/upsert-in-sql\/","url_meta":{"origin":9759,"position":4},"title":"Upsert in SQL","author":"Paolo Redaelli","date":"2023-09-26","format":false,"excerpt":"Inserting and updating data with a single query. Source: Upsert in SQL Upsert in SQL Upsert is an operation that \u278a inserts new records into the database and \u278b updates existing ones. Let's see how it works in different DBMS. The examples are interactive, so you can read and practice.\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8922,"url":"https:\/\/monodes.com\/predaelli\/2021\/11\/18\/an-introduction-to-the-pg_auto_failover-project\/","url_meta":{"origin":9759,"position":5},"title":"An introduction to the pg_auto_failover project","author":"Paolo Redaelli","date":"2021-11-18","format":"link","excerpt":"\u201cPostgres is awesome, makes developping my application so much easier, it solves so many problems for me!\u201d and the next step \u201cso, how do I run Postgres in Production?\u201d. If you\u2019re not sure how to bridge that gap yourself, how to deploy your first production system with automated failover, then\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=9759"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9759\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=9759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=9759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=9759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}