What? This caused me great pain when trying to do an insert. Here in my example I’ve used a CTE for brevity, but imagine you can’t see the input table, and it contains thousands of records. My insert went something like this:

Looking for help?
Hashrocket
developers believe that data quality is as important as code quality. We enjoy
all the challenges of relational databases, from finding the fastest index, to
structuring data to fit the needs of an application. We're eager to share our
experiences; check out
PG Casts,
a series of free weekly PostgreSQL screencasts.

Today I Learned is an open-source project by
Hashrocket
that exists to catalogue the sharing & accumulation of knowledge
as it happens day-to-day. Posts have a 200-word limit, and
posting is open to any Rocketeer as well as selected friends of
Hashrocket. We hope you enjoy learning along with us.