<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PG-Development on PIGSTY</title><link>https://pigsty.io/tags/pg-development/</link><description>Recent content in PG-Development on PIGSTY</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 17 Apr 2026 09:14:36 +0800</lastBuildDate><atom:link href="https://pigsty.io/tags/pg-development/index.xml" rel="self" type="application/rss+xml"/><item><title>PostgreSQL Convention 2024</title><link>https://pigsty.io/blog/pg/pg-convention/</link><pubDate>Wed, 09 Oct 2024 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/pg-convention/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/pg-convention/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/pg-convention.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;No rules, no standards. Some developer conventions for PostgreSQL 16. &lt;a href="https://vonng.com/en/pg/pg-convention/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>AI Large Models and Vector Database PGVector</title><link>https://pigsty.io/blog/pg/llm-and-pgvector/</link><pubDate>Wed, 10 May 2023 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/llm-and-pgvector/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/llm-and-pgvector/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/llm-and-pgvector.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This article focuses on vector databases hyped by AI, introduces the basic principles of AI embeddings and vector storage/retrieval, and demonstrates the functionality, performance, acquisition, and application of the vector database extension PGVECTOR through a concrete knowledge base retrieval case study. &lt;a href="https://vonng.com/en/pg/llm-and-pgvector/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Implementing Advanced Fuzzy Search</title><link>https://pigsty.io/blog/pg/fuzzymatch/</link><pubDate>Fri, 05 Mar 2021 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/fuzzymatch/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/fuzzymatch/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/fuzzymatch.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How to implement relatively complex fuzzy search logic in PostgreSQL? &lt;a href="https://vonng.com/en/pg/fuzzymatch/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Frontend-Backend Communication Wire Protocol</title><link>https://pigsty.io/blog/pg/wire-protocol/</link><pubDate>Tue, 12 Nov 2019 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/wire-protocol/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/wire-protocol/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/wire-protocol.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Understanding the TCP protocol used for communication between PostgreSQL server and client, and printing messages using Go &lt;a href="https://vonng.com/en/pg/wire-protocol/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Transaction Isolation Level Considerations</title><link>https://pigsty.io/blog/pg/isolation-level/</link><pubDate>Tue, 12 Nov 2019 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/isolation-level/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/isolation-level/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/isolation-level.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PostgreSQL actually has only two transaction isolation levels: &lt;strong&gt;Read Committed&lt;/strong&gt; and &lt;strong&gt;Serializable&lt;/strong&gt; &lt;a href="https://vonng.com/en/pg/isolation-level/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>CDC Change Data Capture Mechanisms</title><link>https://pigsty.io/blog/pg/logical-decoding/</link><pubDate>Wed, 12 Jun 2019 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/logical-decoding/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/logical-decoding/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/logical-decoding.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Change Data Capture is an interesting ETL alternative solution. &lt;a href="https://vonng.com/en/pg/logical-decoding/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Locks in PostgreSQL</title><link>https://pigsty.io/blog/pg/pg-lock/</link><pubDate>Tue, 11 Jun 2019 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/pg-lock/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/pg-lock/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/pg-lock.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Snapshot isolation does most of the heavy lifting in PG, but locks still matter. Here’s a practical guide to table locks, row locks, intention locks, and &lt;code&gt;pg_locks&lt;/code&gt;. &lt;a href="https://vonng.com/en/pg/pg-lock/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>O(n2) Complexity of GIN Search</title><link>https://pigsty.io/blog/pg/gin/</link><pubDate>Fri, 12 Apr 2019 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/gin/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/gin/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/gin.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When GIN indexes are used to search with very long keyword lists, performance degrades significantly. This article explains why GIN index keyword search has O(n^2) time complexity. &lt;a href="https://vonng.com/en/pg/gin/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>GeoIP Geographic Reverse Lookup Optimization</title><link>https://pigsty.io/blog/pg/geoip/</link><pubDate>Sat, 07 Jul 2018 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/geoip/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/geoip/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/geoip.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A common requirement in application development is GeoIP conversion - converting source IP addresses to geographic coordinates or administrative divisions (country-state-city-county-town-village) &lt;a href="https://vonng.com/en/pg/geoip/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>PostgreSQL Trigger Usage Considerations</title><link>https://pigsty.io/blog/pg/sql-trigger/</link><pubDate>Sat, 07 Jul 2018 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/sql-trigger/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/sql-trigger/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/sql-trigger.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Detailed understanding of trigger management and usage in PostgreSQL &lt;a href="https://vonng.com/en/pg/sql-trigger/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>PostgreSQL Development Convention (2018 Edition)</title><link>https://pigsty.io/blog/pg/pg-convention-2018/</link><pubDate>Wed, 20 Jun 2018 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/pg-convention-2018/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/pg-convention-2018/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/pg-convention-2018.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Without rules, there can be no order. This article compiles a development specification for PostgreSQL database principles and features, which can reduce confusion encountered when using PostgreSQL. &lt;a href="https://vonng.com/en/pg/pg-convention-2018/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Efficient Administrative Region Lookup with PostGIS</title><link>https://pigsty.io/blog/pg/adcode-geodecode/</link><pubDate>Wed, 06 Jun 2018 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/adcode-geodecode/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/adcode-geodecode/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/adcode-geodecode.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How to efficiently solve the typical reverse geocoding problem: determining administrative regions based on user coordinates. &lt;a href="https://vonng.com/en/pg/adcode-geodecode/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>KNN Ultimate Optimization: From RDS to PostGIS</title><link>https://pigsty.io/blog/pg/knn-optimize/</link><pubDate>Wed, 06 Jun 2018 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/knn-optimize/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/knn-optimize/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/knn-optimize.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ultimate optimization of KNN problems, from traditional relational design to PostGIS &lt;a href="https://vonng.com/en/pg/knn-optimize/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Distinct On: Remove Duplicate Data</title><link>https://pigsty.io/blog/pg/sql-distinct-on/</link><pubDate>Fri, 06 Apr 2018 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/sql-distinct-on/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/sql-distinct-on/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/sql-distinct-on.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Use Distinct On extension clause to quickly find records with maximum/minimum values within groups &lt;a href="https://vonng.com/en/pg/sql-distinct-on/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Function Volatility Classification Levels</title><link>https://pigsty.io/blog/pg/sql-func-volatility/</link><pubDate>Fri, 06 Apr 2018 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/sql-func-volatility/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/sql-func-volatility/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/sql-func-volatility.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PostgreSQL functions have three volatility levels by default. Proper use can significantly improve performance. &lt;a href="https://vonng.com/en/pg/sql-func-volatility/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Implementing Mutual Exclusion Constraints with Exclude</title><link>https://pigsty.io/blog/pg/sql-exclude/</link><pubDate>Fri, 06 Apr 2018 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/sql-exclude/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/sql-exclude/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/sql-exclude.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Exclude constraint is a PostgreSQL extension that can implement more advanced and sophisticated database constraints. &lt;a href="https://vonng.com/en/pg/sql-exclude/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Implementing Cache Synchronization with Go and PostgreSQL</title><link>https://pigsty.io/blog/pg/notify-trigger-based-repl/</link><pubDate>Thu, 03 Aug 2017 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/notify-trigger-based-repl/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/notify-trigger-based-repl/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/notify-trigger-based-repl.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cleverly utilizing PostgreSQL&amp;rsquo;s Notify feature, you can conveniently notify applications of metadata changes and implement trigger-based logical replication. &lt;a href="https://vonng.com/en/pg/notify-trigger-based-repl/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Auditing Data Changes with Triggers</title><link>https://pigsty.io/blog/pg/audit-change/</link><pubDate>Fri, 09 Jun 2017 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/audit-change/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/audit-change/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/audit-change.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Sometimes we want to record important metadata changes for audit purposes. PostgreSQL triggers can conveniently solve this need automatically. &lt;a href="https://vonng.com/en/pg/audit-change/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Building an ItemCF Recommender in Pure SQL</title><link>https://pigsty.io/blog/pg/pg-recsys/</link><pubDate>Wed, 05 Apr 2017 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/pg-recsys/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/pg-recsys/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/pg-recsys.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Five minutes, PostgreSQL, and the MovieLens dataset—that’s all you need to implement a classic item-based collaborative filtering recommender. &lt;a href="https://vonng.com/en/pg/pg-recsys/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>UUID Properties, Principles and Applications</title><link>https://pigsty.io/blog/pg/uuid/</link><pubDate>Sun, 06 Nov 2016 00:00:00 +0000</pubDate><guid>https://pigsty.io/blog/pg/uuid/</guid><description>&lt;p&gt;&lt;a href="https://vonng.com/en/pg/uuid/"&gt;&lt;img src="https://pigsty.io/img/hero/pg/uuid.jpg" alt="featured"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;UUID properties, principles and applications, and how to manipulate UUIDs using PostgreSQL stored procedures. &lt;a href="https://vonng.com/en/pg/uuid/"&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>