Skip to content

Commit

Permalink
Add missing upgrade script
Browse files Browse the repository at this point in the history
And tweak the upgrade incompatibility docs and query.
  • Loading branch information
theory committed Jul 22, 2024
1 parent 5d00b8d commit 8debece
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Revision history for PostgreSQL extension semver.
Fixed a bug in the scanning of pre-releases that start with a zero.
It now properly scans the rest of the pre-release string. As a result,
existing semvers with pre-releases the start with a zero may have been
incorrectly interpreted as valid. See the v0.30.0 changes below for
instructions for finding such invalid semvers. Discovered while
debugging unexpected test failures in #70.
incorrectly interpreted as valid. Any versions returned by this query
will need the leading 0 removed from the pre-release before upgrading:
`SELECT version FROM pkg WHERE get_semver_prerelease(version) ~ '^0\[0-9]+($|\+)'`
Discovered while debugging unexpected test failures in #70.

0.32.1 2023-08-01T23:20:31Z
- Fixed compilation issue on Postgres 16.
Expand Down
14 changes: 14 additions & 0 deletions doc/semver.mmd
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@ comparison operators, are:
-------------------------------------------

Prior to v0.40.0, the semver extension incorrectly allowed some invalid
prerelease values. *BEFORE YOU UPGRADE*, we strongly recommend that you check
for and repair semvers. Use this query to find semvers with invalid
pre-release values:

SELECT name, version FROM packages
WHERE get_semver_prerelease(version) ~ '^0\[0-9]+($|\+)';

For any results returned, update them by removing the leading `0` from the
pre-release, or appending an alphbetic value.

🚨 v0.30.0 Upgrade Compatibility Warning 🚨
-------------------------------------------

Prior to v0.30.0, the semver extension incorrectly allowed some invalid
prerelease and build metadata values. Details below, but *BEFORE YOU UPGRADE*
from an earlier version, we strongly recommend that you check for and repair
any invalid semvers. You can find them using the official [SemVer regular
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions sql/semver--0.32.1--0.40.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- C source code changes only; No SQL changes.

0 comments on commit 8debece

Please sign in to comment.