I used to believe that `TEXT` column type could store

Arpit Bhayani

Arpit Bhayani

Sep 06, 2023 • 1 min read


I used to believe that TEXT column type could store strings of any length, but I was wrong ⚡

Today, while I was going through PostgreSQL source code, I stumbled upon an interesting comment that says that there is an upper limit to single-column value and it is set to 1Gb 🤯

This means, that even though PostgreSQL’s documentation states that we can store “unlimited” length strings, there is an architectural and design limit to what we can store in any column.

I have written a detailed write-up on Duggup where I not only point out the source code where these limits are mentioned but also the key difference between the two types and which one to use and when.

Read - https://lnkd.in/ggpp3ZQD

⚡ I keep writing and sharing these engineering nuggets, so if you are keen on learning them, follow along.

arpitbhayani.me/courses

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses