Skip to content

Fix the PGXN tag that blocked the 2.0.0 upload, and check META.json in CI - #11

Merged
jdatcmd merged 1 commit into
masterfrom
fix/pgxn-meta-tag
Aug 25, 2026
Merged

Fix the PGXN tag that blocked the 2.0.0 upload, and check META.json in CI#11
jdatcmd merged 1 commit into
masterfrom
fix/pgxn-meta-tag

Conversation

@jdatcmd

@jdatcmd jdatcmd commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

PGXN refused the 2.0.0 distribution:

Field /tags[11]: "pl/sql" is not a valid tag [Spec v1.0.0]

A Tag may not contain a slash. Now plsql. No other tag was at fault.

Versioning

The distribution version moves to 2.0.1; the extension version stays at 2.0.0, because nothing about the extension changed. So there is no plx--2.0.1.sql and no upgrade script — adding a version-advancing script and a duplicate install script for a metadata typo would leave dead files in the catalog forever. PGXN treats the two versions as separate, which is exactly this case.

There is no ALTER EXTENSION plx UPDATE for this release, and the CHANGELOG says so.

The actual problem

The only thing validating META.json was PGXN, at upload time — after a release is tagged and published. That's an expensive place to find a typo.

test/check_meta.py (make metacheck) now checks the spec's constraints and runs in CI ahead of the regression suite. Against the unfixed file it reproduces PGXN's rejection exactly:

META.json does not satisfy the PGXN Meta Spec v1:
  tags[11] 'pl/sql' must not contain a slash
exit=1

Why this was easy to get wrong

Worth recording, because the prose and the schema disagree and the prose is the trap.

The spec text says a Tag may contain no "slash, backslash, control, or space" characters. That sentence describes a Term. The Tag schema is:

^[^/\\\p{Cntrl}]{2,}$

which permits spaces. So sql server and string builder are valid tags that would be invalid terms, and the slash in pl/sql was the only real fault. Reading the prose would have led to "fixing" three tags that were never broken.

The validator implements the schema rather than the prose, and its docstring says why, so the next person doesn't repeat that.

Verification

PG18.4: metacheck passes, 13/13 installcheck. Every tag re-checked against the real pattern; 15 tags, all valid.

🤖 Generated with Claude Code

…n CI

PGXN refused the 2.0.0 distribution:

  Field /tags[11]: "pl/sql" is not a valid tag [Spec v1.0.0]

A Tag may not contain a slash. The tag is now plsql. No other tag was at fault.

The distribution version moves to 2.0.1 and the extension version stays at
2.0.0, since nothing about the extension changed. There is therefore no
plx--2.0.1.sql and no upgrade script: adding a version-advancing script and a
duplicate install script for a metadata typo would leave dead files in the
catalog forever. PGXN treats the distribution version and the extension version
as separate, which is exactly the case this covers.

The real problem is that the only thing validating META.json was PGXN itself,
at upload time, which is after a release has been tagged and published. That is
an expensive place to find a typo. test/check_meta.py now checks the spec's
constraints, runs as make metacheck, and runs in CI before the regression suite.
It reproduces the rejection above against the unfixed file.

Writing it turned up why this was easy to get wrong. The spec prose says a Tag
may contain no "slash, backslash, control, or space" characters, but that
sentence describes a Term. The Tag schema is ^[^/\\\p{Cntrl}]{2,}$, which
permits spaces. So "sql server" and "string builder" are valid tags that would
be invalid terms, and the slash in "pl/sql" was the only real fault. The
validator implements the schema rather than the prose, and says so, so the next
person does not go and "fix" the tags that were never broken.

Verified on PostgreSQL 18.4: metacheck passes, 13/13 installcheck.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jdatcmd
jdatcmd merged commit 184fd03 into master Aug 25, 2026
6 checks passed
@jdatcmd
jdatcmd deleted the fix/pgxn-meta-tag branch August 25, 2026 14:25
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.

1 participant