January 14, 2026
Cat-coded QR chaos
Generate QR Codes with Pure SQL in PostgreSQL
QR codes made with just a database—community laughs, debates, and kind of loves it
TLDR: A developer made QR codes using only a PostgreSQL database, thanks to one giant SQL command, and even built a safety check for message length. Comments split between applause for the clever hack and caution about using it in real systems, with requests for speed tests and memes galore.
Saturday cat alarm leads to a wild flex: a developer whipped up QR codes using only a PostgreSQL database—no add-ons, no libraries, just one monster SQL statement. He admits it’s a just-for-fun hack, not a factory tool, but notes PostgreSQL 17 ran it faster than 16. The crowd? Instantly nostalgic. One fan recalled “doing weird things in SQL for fun,” while another called the pure database trick “impressive,” and a third said reading the code felt “eye-opening—slightly like learning Haskell.” Even non-coders got the vibe: making pixel art out of spreadsheets. No extensions, no plugins, just raw brainpower and squares.
The drama kicks in where it always does: should this ever touch production? Some cheer, “ship it for giggles,” others want real benchmarks against normal QR codes tools and performance at scale. The safer version even scolds you if your message is too long—Version 1-M (medium error correction) can’t fit 15 characters—cue jokes about “SQL saying nope.” And yes, the 11x engineer meme lands hard: one hour of ChatGPT chat versus a weekend of hand-coding two decades ago. Verdict from the comments: it’s part art project, part brain teaser, and all cat-powered chaos—and the internet can’t stop arguing while grinning.
Key Points
- •A QR code generator was implemented as a single pure SQL statement for PostgreSQL.
- •The solution requires no external libraries or PostgreSQL extensions.
- •Two scripts are provided: pqr.sql (basic) and pqrsafe.sql (validates payload length).
- •PostgreSQL 17 executed the SQL faster than PostgreSQL 16 in testing; execution plans not yet compared.
- •pqrsafe.sql enforces QR Version 1-M (ECC M) payload limits, raising errors for overly long inputs.