Skip to content

test(oracle): check pgvector, postgis and contrib extension types - #94

Merged
colinhacks merged 7 commits into
mainfrom
test-oracle-extension-types
Oct 23, 2026
Merged

colinhacks merged 7 commits into
mainfrom
test-oracle-extension-types

Conversation

@colinhacks

Copy link
Copy Markdown
Owner

The soundness oracle had no seed value for most extension types, so a statement with a parameter of one was left unchecked and a column of one held only NULL, and CI's oracle job installed no pgvector or PostGIS, the two extensions Neon and Supabase databases install most. This covers both:

  • Seed values in oracle/src/seed.rs for pgvector's vector, halfvec and sparsevec, PostGIS's geometry, geography, box2d and box3d, cube (and earth, a domain over it), seg, the isn types, and every multirange, built-in ones included, which had none. Each is tried against the column and dropped where its type or typmod refuses it.
  • Arrays of them: an array's element is the first pool value its element type, typmod included, accepts (vector(3)[] refuses '{"[1]"}'); the element is quoted and separated from a NULL by the type's own typdelim ('{"POINT(1 2)":NULL}' for geometry[]), and the NULL-element check reads that delimiter too.
  • Four cases: pgvector_types (columns with typmods, arrays, the distance operators with a parameter, = any(:qs), inserts, documents), postgis_types (geometry with and without a typmod, geography, box2d, geometry[], ST_DWithin, ST_Dump's composite, GeoJSON inside documents), contrib_types (cube, earth, seg, the isn types, lo and oid, as columns, parameters and inside documents) and multirange_types. Every statement in them is checked; none is listed unchecked.
  • CI installs postgresql-18-pgvector and postgresql-18-postgis-3 from PGDG beside postgresql-18 for the oracle job, and AGENTS.md says the two cases need them.

The whole oracle passes with --strict-coverage on Postgres 18 with both extensions (121 cases), and the four cases give the same result on Supabase's and Neon's Postgres 17 images. No existing case's expected.txt changed.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 22:09
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reylo Ready Ready Preview Oct 23, 2026 10:29pm UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues: one docs correction and one small simplification, both inline.

Reviewed changes

All five commits: the extension and multirange seed pools, the delimiter-aware array literals and NULL-element check, four new oracle cases, and the CI install.

  • Seed pools: scalars gains literals for pgvector, PostGIS, cube/earth, seg, isn and multiranges (typtype = 'm'), and each is still filtered by the server through try_execute.
  • Array literals: the element is now quoted and escaped for array syntax, and it is separated from the NULL by the element type's typdelim. The new accepted_pool takes as the element the first scalar that the element type (typmod included) accepts, and both seed and bind use it.
  • NULL-element check: array_has_null splits on the type's own delimiter. It looks that up by the analysis's type_name, which is the registry's typname (e.g. _geometry), so it matches the delimiters() map.
  • Cases: pgvector_types, postgis_types, contrib_types and multirange_types are blessed with every statement checked.
  • CI and docs: PGDG's postgresql-18-pgvector and postgresql-18-postgis-3 are installed for the oracle job, and AGENTS.md notes it.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread AGENTS.md Resolved
Comment thread oracle/src/seed.rs Resolved
@colinhacks
colinhacks force-pushed the test-oracle-extension-types branch from 443877d to c4ab98e Compare October 23, 2026 22:27

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found. Both earlier findings are fixed.

Reviewed changes

Two commits landed since the last review. Each one fixes an earlier finding:

  • Homebrew instructions: AGENTS.md now says brew install pgvector postgis, because pgvector is its own formula and does not come with postgresql@18.
  • pool covers scalars only: pool now returns with_casts(col, scalars(…)). This means accepted_pool is the only place an array pool gets built, and it always checks the element first. The array unit test calls with_casts(&vectors, arrays(…)) directly. Production behavior does not change: outside tests, accepted_pool's non-array branch is the only caller of pool.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@colinhacks
colinhacks merged commit 44b6f67 into main Oct 23, 2026
6 checks passed
@colinhacks
colinhacks deleted the test-oracle-extension-types branch October 23, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants