How Golang Talks to PostgreSQL (Simple vs Extended Protocol)
Most articles about PostgreSQL’s Extended Protocol focus on the ability to parse and plan a query once and reuse it — and that’s important. But they often overlook another powerful feature: binary format for data transfer. That’s what I want to explore in detail in this article, and how it’s handled by the two main PostgreSQL libraries in Go: pgx and pq.