PgZen (@PgZenApp) header
PgZen (@PgZenApp) profile picture

Native PostgreSQL client for Apple platforms

Joined February 2017
Photo by PgZen (@PgZenApp)Photo by PgZen (@PgZenApp)Photo by PgZen (@PgZenApp)Photo by PgZen (@PgZenApp)Photo by PgZen (@PgZenApp)Photo by PgZen (@PgZenApp)Photo by PgZen (@PgZenApp)Photo by PgZen (@PgZenApp)Photo by PgZen (@PgZenApp)Photo by PgZen (@PgZenApp)
🚀 PGZen is live on the Mac App Store! A native PostgreSQL client for macOS. 🎁 Giving away 3 free copies! To enter: Follow @PgZenApp Reply with what you're building with PostgreSQL 🏆 3 random winners on Nov 21! 🔗 pgzen.dev/
3
1
4
117
Use INSERT ... ON CONFLICT for safe upserts. Avoid SELECT followed by INSERT or UPDATE in application code—it suffers from race conditions under concurrent writes. Use INSERT ... ON CONFLICT with a UNIQUE constraint or index to handle conflicts atomically. #PostgreSQL #SQL
4
Use IS DISTINCT FROM for null-safe comparisons In SQL, NULL = NULL and NULL != 'active' both evaluate to UNKNOWN (falsy), which silently drops NULL rows from WHERE clauses. IS DISTINCT FROM treats NULL as a comparable value, making it much cleaner than chaining OR col IS NULL.
14
Use COALESCE to safely handle NULL math and defaults In SQL, any math or string concatenation involving NULL evaluates to NULL (100 + NULL = NULL). COALESCE returns the first non-null argument, making it essential for fallback values and safe calculations.
1
3
78
Always index your Foreign Keys Postgres automatically creates a unique index for ⁠PRIMARY KEY⁠ and ⁠UNIQUE⁠ constraints, but not for ⁠FOREIGN KEY⁠ columns. It causes slow ⁠JOIN⁠ queries and full table scans on the child table whenever a parent row is updated or deleted.
7
Remember, remember, the Go Developer Survey closes 3rd of November!
The 2026 Go Developer Survey is open! Help set Go’s priorities for next year by telling us how you use Go and where it could be better. ⏱️ 10–20 minutes 📅 Open through November 3 blink.qualtrics.com/jfe/form… #golang
2
20
1,564
Never use ⁠FLOAT⁠ or ⁠REAL⁠ for money Floating-point types use binary approximations that cause rounding errors (⁠0.1 + 0.2 != 0.3⁠). Always store currency using exact ⁠NUMERIC(p, s)⁠ or integer cents (⁠BIGINT⁠).
10
I can’t believe they invented irl excalidraw. What is this technology.
How we deploy multi-trillion parameter models at scale Today, let's break down the math for how @cerebras: 1. Fits the full model into on-chip memory 2. Maps the model across multiple chips 3. Handles a high # of concurrent requests
20
97
4
2,557
119,791
Use ⁠RETURNING⁠ to avoid extra ⁠SELECT⁠ round-trips Don't run a second query just to fetch generated IDs, defaults, or updated values. Add ⁠RETURNING⁠ to ⁠INSERT⁠, ⁠UPDATE⁠, or ⁠DELETE⁠ to get the mutated rows back in a single database round-trip. #postgresql
12
JSON⁠ stores an exact text copy that Postgres must re-parse on every read. ⁠JSONB⁠ stores decomposed binary data, making reads much faster and unlocking ⁠GIN⁠ indexing and containment queries (⁠@>⁠), at the cost of only tiny write overhead.
5
Prefer ⁠IDENTITY⁠ over ⁠SERIAL⁠ Avoid ⁠SERIAL⁠ and ⁠BIGSERIAL⁠ for new tables. ⁠GENERATED ALWAYS AS IDENTITY⁠ is the modern SQL standard, handles sequence permissions cleanly, and blocks accidental manual ID overrides.
7
TIMESTAMPTZ and TIMESTAMP both use 8 bytes, but TIMESTAMP drops timezone context and causes silent DST bugs — prefer TIMESTAMPTZ for almost everything.
2
2
53
Which Laravel? 😏
The agents finished porting Campfire to Laravel and Django too. I'm sure there are optimizations that could be found there too, but the whole point is to get a sense of how frontier agents do with different environments out the box. github.com/basecamp/once-cam…
44
19
16
408
94,034
Help agents write relevant Golang code with our new set of AI skills – Modern Go Guidelines. They cover the most useful features from Go 1.0 to 1.27, including everything in the `modernize` analyzer, and instruct your agents to write modern idioms 👇 github.com/JetBrains/go-mode…
1
33
1
229
13,404
This article by @func25 is one of the best Go articles I’ve read. I had no idea what a goroutine was but learnt it due to this article I also learnt more about concurrency in general, and how to effectively wait for a goroutine to finish Would definitely recommend func25.dev/posts/go-goroutin… #Golang #Learning
4
13
1
110
7,714
Postgres tip: text and varchar store data the same way, but char is space‑padded and slower — prefer text for almost everything.
🤖 Made with AI
23
PgZen retweeted
Cursor is now part of @SpaceX. Today, we have officially closed our acquisition. We will join the @spacexai team to help make Grok the world's most useful AI and improve Grok Build, Grok Bot, Grok API, Cursor, and more. SpaceX has built some of the most inspiring and impressive technology in the world, and we’re grateful for the opportunity to become part of such a special company. Onwards.
2,479
4,553
1,822
54,967
9,913,570
PgZen retweeted
To be honest, I think they missed the strongest argument in favor of Go: it compiles **fast**. Even in the LLM age it's extremely important that LLMs can iterate on code quickly and a lightning fast compiler is the biggest factor in that. developers.googleblog.com/wh…
34
53
10
551
35,643
A Postgres transaction opens 65 subtransactions. The result? 7,200 TPS → 160 TPS performance drop. We dive deep into Postgres internals in our latest blog, showing why this happens and the dangers of using too many subtransactions in Postgres.
3
13
3
229
23,589