<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Database on Kuldeep Pisda</title><link>https://kdpisda.in/tag/database/</link><description>Recent content in Database on Kuldeep Pisda</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 25 May 2026 10:00:00 +0530</lastBuildDate><atom:link href="https://kdpisda.in/tag/database/index.xml" rel="self" type="application/rss+xml"/><item><title>Why We Stopped Putting Enums in Postgres</title><link>https://kdpisda.in/stop-putting-enums-in-postgres/</link><pubDate>Mon, 25 May 2026 10:00:00 +0530</pubDate><guid>https://kdpisda.in/stop-putting-enums-in-postgres/</guid><description>&lt;p&gt;Reach for a Postgres &lt;code&gt;ENUM&lt;/code&gt; and it feels like the responsible choice. You&amp;rsquo;ve got a
column that can only be &lt;code&gt;pending&lt;/code&gt;, &lt;code&gt;sent&lt;/code&gt;, or &lt;code&gt;failed&lt;/code&gt;, so you encode that at the
database level, get a compact type, readable &lt;code&gt;\d&lt;/code&gt; output, and a hard guarantee that no
garbage value ever lands in the column. Textbook. I&amp;rsquo;ve shipped plenty of them.&lt;/p&gt;
&lt;p&gt;Then I spent about fifteen months embedded in a multi-tenant AI voice and texting
platform for home-services contractors — an AI receptionist that answers calls, books
jobs into the CRMs those contractors already run on, and drives outbound campaigns. The
codebase moved &lt;em&gt;fast&lt;/em&gt;: on the order of six thousand PRs in eleven months, a migration
runner with per-environment concurrency locks, and enough accumulated schema churn that
the team eventually re-baselined the whole migration history from a production schema
dump. In that environment, native enums quietly became a tax. So on new columns we
stopped using them — plain &lt;code&gt;text&lt;/code&gt;, with the value set validated in the application
layer. Here&amp;rsquo;s the reasoning, because the tradeoff is real and it cuts both ways.&lt;/p&gt;</description></item></channel></rss>