<?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 Nalar</title>
    <link>https://nalar.dev/tags/postgresql/</link>
    <description>Recent content in PostgreSQL on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 02 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/postgresql/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Covering Indexes and Index-Only Scans for Faster Database Reads</title>
      <link>https://nalar.dev/covering-indexes-and-index-only-scans/</link>
      <pubDate>Wed, 02 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/covering-indexes-and-index-only-scans/</guid>
      <description>&lt;p&gt;An index normally helps a database find rows. A covering index can go further: it contains all columns needed by a query, allowing the database engine to answer some reads without fetching every matching row from the table.&lt;/p&gt;&#xA;&lt;p&gt;That can reduce random I/O for read-heavy workloads, but it also makes indexes larger and writes more expensive. Covering is a workload-specific optimization, not a reason to copy every selected column into every index.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enforce Non-Overlapping Time Ranges with PostgreSQL Exclusion Constraints</title>
      <link>https://nalar.dev/postgresql-exclusion-constraints-non-overlapping-ranges/</link>
      <pubDate>Tue, 01 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/postgresql-exclusion-constraints-non-overlapping-ranges/</guid>
      <description>&lt;p&gt;Applications that schedule rooms, equipment, or maintenance windows often need a simple invariant: two active reservations for the same resource must not overlap. Checking for conflicts in application code looks easy, but concurrent transactions can both pass the check before either inserts.&lt;/p&gt;&#xA;&lt;p&gt;PostgreSQL can enforce this invariant inside the database with range types and exclusion constraints.&lt;/p&gt;&#xA;&lt;h2 id=&#34;model-the-interval-explicitly&#34;&gt;Model the interval explicitly&lt;/h2&gt;&#xA;&lt;p&gt;A half-open timestamp range includes its start and excludes its end. That lets adjacent bookings touch without overlapping.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
