<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Postgresql on Christopher Tyler</title><link>https://cetyler.github.io/tags/postgresql/</link><description>Recent content in Postgresql on Christopher Tyler</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 18 Oct 2025 17:17:24 -0500</lastBuildDate><atom:link href="https://cetyler.github.io/tags/postgresql/index.xml" rel="self" type="application/rss+xml"/><item><title>Find Error in pg_dump</title><link>https://cetyler.github.io/til/2023/2023-11-5_pg_dump_sed/</link><pubDate>Wed, 05 Nov 2025 23:52:55 -0500</pubDate><guid>https://cetyler.github.io/til/2023/2023-11-5_pg_dump_sed/</guid><description>Find this handy tip on Mastodon.</description></item><item><title>List table columns in PostgreSQL database</title><link>https://cetyler.github.io/til/2025/2025-10-18_list_tables_postgresql/</link><pubDate>Sat, 18 Oct 2025 16:13:43 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-10-18_list_tables_postgresql/</guid><description>An easy way to get all the tables in a given database.</description></item><item><title>Last Updated Columns with Postgres</title><link>https://cetyler.github.io/til/2025/2025-10-18_postgres_updated_columns/</link><pubDate>Sat, 18 Oct 2025 15:31:38 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-10-18_postgres_updated_columns/</guid><description>Good article from Gunnar how to avoid using triggers.</description></item><item><title>Upgrade PostgreSQL from 17 to 18 on Windows</title><link>https://cetyler.github.io/posts/2025/2025-10-10_upgrade_postgresql/</link><pubDate>Fri, 10 Oct 2025 17:37:30 -0500</pubDate><guid>https://cetyler.github.io/posts/2025/2025-10-10_upgrade_postgresql/</guid><description>A couple of curveballs but a little easier than last year.</description></item><item><title>Data Alignment to Save Space</title><link>https://cetyler.github.io/til/2025/2025-9-18_data_alignment/</link><pubDate>Thu, 18 Sep 2025 16:46:50 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-9-18_data_alignment/</guid><description>While it was an excellent talk, this was my biggest takeaway.</description></item><item><title>Remove Characters from a String</title><link>https://cetyler.github.io/til/2025/2025-8-26_remove_string/</link><pubDate>Tue, 26 Aug 2025 14:41:40 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-8-26_remove_string/</guid><description>Needed to remove an email from a string of emails.</description></item><item><title>Get Schema Sizes</title><link>https://cetyler.github.io/til/2025/2025-7-29_schema_size/</link><pubDate>Tue, 29 Jul 2025 20:21:47 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-7-29_schema_size/</guid><description>Get the size of each schema in a database.</description></item><item><title>How to Append Text in PostgreSQL</title><link>https://cetyler.github.io/til/2025/2025-7-18_append_text_postgresql/</link><pubDate>Fri, 18 Jul 2025 13:40:09 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-7-18_append_text_postgresql/</guid><description>How to append text to a text column.</description></item><item><title>A PostgreSQL planner gotcha with CTEs DELETE and LIMIT</title><link>https://cetyler.github.io/til/2025/2025-5-3_planner_oops/</link><pubDate>Sat, 03 May 2025 16:30:33 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-5-3_planner_oops/</guid><description>Good article from Shayon about CTEs and planner interactions.</description></item><item><title>Validating Data Types from Semi-Structured Data Loads in Postgres with pg_input_is_valid</title><link>https://cetyler.github.io/til/2025/2025-5-3_valid_types/</link><pubDate>Sat, 03 May 2025 16:08:59 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-5-3_valid_types/</guid><description>Yet another excellent article from Elizabeth.</description></item><item><title>How to use Fuzzy String Matching with PostgreSQL</title><link>https://cetyler.github.io/til/2025/2025-4-6_fuzzy_postgresql/</link><pubDate>Sun, 06 Apr 2025 11:42:16 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_fuzzy_postgresql/</guid><description>Good article from Peter.</description></item><item><title>How to List Active Connections on PostgreSQL</title><link>https://cetyler.github.io/til/2025/2025-4-6_active_connection/</link><pubDate>Sun, 06 Apr 2025 11:36:10 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_active_connection/</guid><description>How to return the active connections.</description></item><item><title>Working with Time in Postgres</title><link>https://cetyler.github.io/til/2025/2025-4-6_postgres_time/</link><pubDate>Sun, 06 Apr 2025 11:33:38 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_postgres_time/</guid><description>Yet another good article from Elizabeth.</description></item><item><title>Escape Keys using psycopg2</title><link>https://cetyler.github.io/til/2025/2025-4-6_escape_keys/</link><pubDate>Sun, 06 Apr 2025 11:29:10 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_escape_keys/</guid><description>A mistake I seem to make repeatedly.</description></item><item><title>psql is Awesome</title><link>https://cetyler.github.io/til/2025/2025-4-6_psql_awesome/</link><pubDate>Sun, 06 Apr 2025 11:25:07 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_psql_awesome/</guid><description>Excellent talk from Laetitia.</description></item><item><title>How to use Variables in a psql Script</title><link>https://cetyler.github.io/til/2025/2025-4-6_psql_variables/</link><pubDate>Sun, 06 Apr 2025 11:19:37 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_psql_variables/</guid><description>How to use variables.</description></item><item><title>Improving GROUP BY with CREATE STATISTICS</title><link>https://cetyler.github.io/til/2025/2025-4-6_create_stats/</link><pubDate>Sun, 06 Apr 2025 11:03:29 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_create_stats/</guid><description>Improve planning by using Create Statistics from Hans.</description></item><item><title>Include Schema in psycopg2 Connection String</title><link>https://cetyler.github.io/til/2025/2025-4-6_psycopg2_string/</link><pubDate>Sun, 06 Apr 2025 10:45:49 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_psycopg2_string/</guid><description>A method to connect to a specific schema.</description></item><item><title>Create Read Only User in PostgreSQL</title><link>https://cetyler.github.io/til/2025/2025-4-6_readonly_user/</link><pubDate>Sun, 06 Apr 2025 10:34:11 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_readonly_user/</guid><description>Creating a read only user.</description></item><item><title>MERGE Command with Examples</title><link>https://cetyler.github.io/til/2025/2025-4-6_merge/</link><pubDate>Sun, 06 Apr 2025 10:20:07 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-6_merge/</guid><description>How to use the merge command with PostgreSQL 15 and above.</description></item><item><title>Creating Histograms with Postgres</title><link>https://cetyler.github.io/til/2025/2025-4-4_histograms_postgres/</link><pubDate>Fri, 04 Apr 2025 19:29:24 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-4_histograms_postgres/</guid><description>A nice article on how to do histograms in PostgreSQL.</description></item><item><title>Data Spines</title><link>https://cetyler.github.io/til/2025/2025-4-1_data_spines/</link><pubDate>Tue, 01 Apr 2025 19:04:02 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-4-1_data_spines/</guid><description>A way to fill in data.</description></item><item><title>List Table Columns in PostgreSQL Database</title><link>https://cetyler.github.io/til/2025/2025-3-31_list_tables/</link><pubDate>Mon, 31 Mar 2025 20:50:24 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-3-31_list_tables/</guid><description>A way to list table columns.</description></item><item><title>How to Generate a list of Tables to Drop</title><link>https://cetyler.github.io/til/2025/2025-3-29_drop_tables/</link><pubDate>Sat, 29 Mar 2025 21:08:33 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-3-29_drop_tables/</guid><description>An easy method to get a list of tables to remove.</description></item><item><title>Using Regex in PostgreSQL</title><link>https://cetyler.github.io/til/2025/2025-3-29_regex/</link><pubDate>Sat, 29 Mar 2025 21:01:37 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-3-29_regex/</guid><description>How to do regex with SQL.</description></item><item><title>Linear Regression</title><link>https://cetyler.github.io/til/2025/2025-3-29_linear_regression/</link><pubDate>Sat, 29 Mar 2025 20:57:27 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-3-29_linear_regression/</guid><description>How to do linear regression with SQL.</description></item><item><title>Date Functions</title><link>https://cetyler.github.io/til/2025/2025-3-29_date_functions/</link><pubDate>Sat, 29 Mar 2025 20:46:37 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-3-29_date_functions/</guid><description>Different ways to extract values of a date.</description></item><item><title>Sampling</title><link>https://cetyler.github.io/til/2025/2025-3-29_sampling/</link><pubDate>Sat, 29 Mar 2025 20:26:00 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-3-29_sampling/</guid><description>Sampling data with SQL.</description></item><item><title>Random</title><link>https://cetyler.github.io/til/2025/2025-3-29_random/</link><pubDate>Sat, 29 Mar 2025 20:14:38 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-3-29_random/</guid><description>Some different ways to create random data</description></item><item><title>Create Table with Existing Table with No Data</title><link>https://cetyler.github.io/til/2025/2025-3-28_create_table/</link><pubDate>Fri, 28 Mar 2025 21:12:09 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-3-28_create_table/</guid><description>Another Haki tip.</description></item><item><title>Postgres query cancellation</title><link>https://cetyler.github.io/til/2025/2025-03-18_pg_query_cancel/</link><pubDate>Tue, 18 Mar 2025 11:15:37 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-03-18_pg_query_cancel/</guid><description>Couple of different ways to add a timeout to a PostgreSQL query.</description></item><item><title>VS Code to Copy and Paste to Terminal</title><link>https://cetyler.github.io/til/2025/2025-03-10_vs_code_copy_pasta/</link><pubDate>Mon, 10 Mar 2025 11:18:37 -0500</pubDate><guid>https://cetyler.github.io/til/2025/2025-03-10_vs_code_copy_pasta/</guid><description>Very useful tip from Mehdi without leaving your IDE</description></item><item><title>Generate CREATE TABLE query for an existing table</title><link>https://cetyler.github.io/til/2025/2025-02-20_postgres/</link><pubDate>Sat, 22 Feb 2025 20:25:47 -0600</pubDate><guid>https://cetyler.github.io/til/2025/2025-02-20_postgres/</guid><description>When you do not have the script that created the table.</description></item><item><title>Upgrade from PostgreSQL 15 to 17 on Windows using pg_upgrade</title><link>https://cetyler.github.io/posts/2024/2024-11-11-pgupgrade/</link><pubDate>Sun, 10 Nov 2024 14:26:17 -0600</pubDate><guid>https://cetyler.github.io/posts/2024/2024-11-11-pgupgrade/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;At work I needed to upgrade from PostgreSQL from 15 to 17.
The process is not that different than upgrading in Ubuntu but there were a couple
of items that threw me off.&lt;/p&gt;
&lt;h2 id="perform-backup"&gt;Perform Backup&lt;/h2&gt;
&lt;p&gt;This should be done prior to the update in case something goes wrong:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CTyler@CTYLER_NB &lt;span style="color:#960050;background-color:#1e0010"&gt;&lt;/span&gt; C:\Program Files\PostgreSQL\&lt;span style="color:#ae81ff"&gt;17&lt;/span&gt;\bin &lt;span style="color:#960050;background-color:#1e0010"&gt;&lt;/span&gt; [&lt;span style="color:#ae81ff"&gt;08&lt;/span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;:&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;22&lt;/span&gt;] 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;❯&lt;/span&gt; &amp;amp; &lt;span style="color:#e6db74"&gt;&amp;#39;C:\Program Files\PostgreSQL\17\bin\pg_dumpall.exe&amp;#39;&lt;/span&gt; -p &lt;span style="color:#ae81ff"&gt;5432&lt;/span&gt; -U postgres &lt;span style="color:#f92672"&gt;-f&lt;/span&gt; D:\Backups\postgresql-ctyler_nb-&lt;span style="color:#ae81ff"&gt;20241107&lt;/span&gt;-&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;.out
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This was based on the documentation
&lt;a href="https://www.postgresql.org/docs/current/app-pg-dumpall.html"&gt;PostgreSQL: Documentation: 17: pg_dumpall&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; keep in mind that you should create a &lt;code&gt;pgpass.conf&lt;/code&gt;
(or &lt;code&gt;.pgpass&lt;/code&gt; for Linux):&lt;/p&gt;</description></item><item><title>Check for unused Indexes</title><link>https://cetyler.github.io/til/2023/20230909235222/</link><pubDate>Mon, 18 Dec 2023 14:00:00 -0500</pubDate><guid>https://cetyler.github.io/til/2023/20230909235222/</guid><description>Part of a larger PostgreSQL management article.</description></item><item><title>Using psql Variables to Introspect Your Script</title><link>https://cetyler.github.io/til/2023/2023-11-19_psql_vars/</link><pubDate>Sun, 19 Nov 2023 00:03:39 -0500</pubDate><guid>https://cetyler.github.io/til/2023/2023-11-19_psql_vars/</guid><description>Another good article from Lucas.</description></item><item><title>psql Watch Improvements</title><link>https://cetyler.github.io/til/2023/2023-11-19_psql_watch/</link><pubDate>Fri, 10 Nov 2023 00:00:45 -0500</pubDate><guid>https://cetyler.github.io/til/2023/2023-11-19_psql_watch/</guid><description>A good tip found by Luca.</description></item><item><title>How to List Active Connections on PostgreSQL</title><link>https://cetyler.github.io/til/2023/20230529112626/</link><pubDate>Tue, 17 Oct 2023 11:00:00 -0500</pubDate><guid>https://cetyler.github.io/til/2023/20230529112626/</guid><description>How to check using a query what is actively running.</description></item><item><title>Check for Unvalidated Database Constraints</title><link>https://cetyler.github.io/til/2023/20230707183736/</link><pubDate>Tue, 10 Oct 2023 11:00:00 -0500</pubDate><guid>https://cetyler.github.io/til/2023/20230707183736/</guid><description>Verify that you don&amp;rsquo;t have a constraint created without validation.</description></item><item><title>Date, Time and Time Zones</title><link>https://cetyler.github.io/posts/2023/20230714134310/</link><pubDate>Wed, 04 Oct 2023 14:00:00 -0500</pubDate><guid>https://cetyler.github.io/posts/2023/20230714134310/</guid><description>The pain of dealing with dates and time.</description></item><item><title>Set Statement Timeout</title><link>https://cetyler.github.io/til/2023/202308012255/</link><pubDate>Tue, 01 Aug 2023 22:55:00 -0500</pubDate><guid>https://cetyler.github.io/til/2023/202308012255/</guid><description>Set a timeout in case you want to terminate a long running query.</description></item><item><title>Escape Keys using psycopg2</title><link>https://cetyler.github.io/til/2023/20230502141136/</link><pubDate>Fri, 02 Jun 2023 20:00:00 -0500</pubDate><guid>https://cetyler.github.io/til/2023/20230502141136/</guid><description>Making sure that using &lt;code&gt;%&lt;/code&gt; in PostgreSQL works with psycopg2.</description></item><item><title>Application Name in PostgreSQL</title><link>https://cetyler.github.io/til/2023/20230128205454/</link><pubDate>Fri, 31 Mar 2023 00:00:00 -0500</pubDate><guid>https://cetyler.github.io/til/2023/20230128205454/</guid><description>Send application name to PostgreSQL.</description></item><item><title>Get Disk Size for Each Database</title><link>https://cetyler.github.io/til/2022/20221106193508/</link><pubDate>Fri, 10 Mar 2023 00:00:00 -0500</pubDate><guid>https://cetyler.github.io/til/2022/20221106193508/</guid><description>Get the disk size for each database in PostgreSQL.</description></item><item><title>Include Schema in psycopg2 Connection String</title><link>https://cetyler.github.io/til/2022/20221218161531/</link><pubDate>Mon, 19 Dec 2022 17:00:00 -0500</pubDate><guid>https://cetyler.github.io/til/2022/20221218161531/</guid><description>Include schema in PostgreSQL connection string.</description></item><item><title>Create Automatic Timestamps in PostgreSQL</title><link>https://cetyler.github.io/til/2022/2022-12-15_timestamp/</link><pubDate>Fri, 16 Dec 2022 18:00:00 -0500</pubDate><guid>https://cetyler.github.io/til/2022/2022-12-15_timestamp/</guid><description>Create automatic timestamps by default.</description></item></channel></rss>