<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>DDL on Nalar</title>
    <link>https://nalar.dev/tags/ddl/</link>
    <description>Recent content in DDL on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 15 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/ddl/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>PostgreSQL NOT VALID Constraints Separate Enforcement from Table Scans</title>
      <link>https://nalar.dev/postgresql-not-valid-constraints-separate-enforcement-from-table-scans/</link>
      <pubDate>Tue, 15 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/postgresql-not-valid-constraints-separate-enforcement-from-table-scans/</guid>
      <description>&lt;p&gt;Adding a constraint to a populated PostgreSQL table can combine two distinct jobs: establish enforcement for future writes and prove that every existing row already satisfies the rule. &lt;code&gt;NOT VALID&lt;/code&gt; separates those jobs for foreign-key and check constraints. The constraint becomes active for later inserts and updates, while verification of older rows is deferred.&lt;/p&gt;&#xA;&lt;p&gt;That separation changes the locking profile of a schema migration without changing the intended final constraint. It also creates a temporary catalog state in which PostgreSQL enforces the rule but has not yet established that all stored rows satisfy it.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
