Dual-target TestCompat pattern: run same SQL against pglike and real PostgreSQL #5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add a
TestCompatpattern that runs identical SQL statements against both pglike (SQLite-backed) and a real PostgreSQL instance to catch translation divergence.Approach
Parameterized Go tests, not a custom SQL test framework (replaces the pgTAP idea from #2):
testDBs(t)returns pglike always; adds real PG when a connection string is available (e.g.PG_TEST_DSNenv var)Why not pgTAP
EXECUTE, the most interesting assertions (throws_ok,cmp_ok) are impossibleSee #2 for the original pgTAP discussion.
Migrated from Codeberg: originally #5, opened 2026-03-19.