Repository navigation
Spike G: the server's own text for a declared object - #264
Merged
Merged
Conversation
For the catalog verifier (#30): an expression key and a condition are text of the server's own in the catalog, and a declaration holds the package's. The spike has the server write the declared object on a temporary table with the real table's name and columns, in a savepoint that is rolled back, and compares the two as the catalog states them. 90 tests on PostgreSQL 16 and 18. The README has what was measured, what it takes and what it does not show. Closes #255 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #255
Problem
The catalog verifier (#30) has to say whether an expression key or a condition in the database is the declared one. The catalog holds the server's own text and a declaration holds the package's:
"Tag" <> 'blocked'is(("Tag")::text <> 'blocked'::text)there. Nothing in the repository says how the two can be compared on a production database, where the tests' way, a second database built withEnsureCreated(), is not at hand.Change
spikes/G.CatalogText, throwaway code on Npgsql alone.ShadowKit.cscreates the declared object on a temporary table that has the real table's name and columns, in a savepoint that is rolled back, and reads it from the catalog as the real one is read.Questions.csis one test per question of the issue, on PostgreSQL 16 and 18. The README has what was measured, what it takes and what it does not show.CLAUDE.md names the spike and its command. The Spikes lane runs it with spike E's servers, since it reads
SPIKE_E_PG16andSPIKE_E_PG18where its own variables are not set.The answer is in #30, with the maintainer's decision of 2026-11-28: the shadow, for the objects that need it. #259 builds it.
Tests
90 tests, 45 on each of PostgreSQL 16.15 and 18.1.
Each mechanism of
ShadowKit.cswas taken out in turn:COLLATE "C"Measured by hand and not by a test: a standby, made with
pg_basebackupinside the test container, refuses the shadow with 25006 and reads the catalog, on both versions. The test holds a read-only transaction, which fails with the same SQLSTATE.🤖 Generated with Claude Code