-
Notifications
You must be signed in to change notification settings - Fork 4
Add new functions, enums #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
5a01ec5
81bdb18
d231a58
e8e2717
0ff8a9a
5c59f66
ca7c8c1
700ac3b
4addd8c
b1afca2
3bde4a8
c75eb40
262434f
6ad3efb
82be5ac
7a5fe71
21ec71b
55db3c7
5332bc5
4b86e4f
4c780b0
65a998b
5e73ee9
5f7e573
bb6146b
a4f0695
7473aa7
34d6fcf
ab0306c
3028c8a
a4e8746
9e73dfb
1763a93
d910a3c
3c33da3
cd75dc6
ab5f735
d9fd646
a3c7476
84e9a0d
11fcb95
4f45664
3e290be
12c5596
9af1f2e
4b18338
5366157
e2525b0
5400e68
f605bb4
f5a65d9
3f9070d
2d5179e
752088f
a1796d5
8146d5a
94a29b5
1b31c0d
7d3d367
0c54003
312a11c
56b6667
15c6ad6
124f5b0
f3cf9a3
c61bc28
8f6ea7b
c0b3eb1
5be84a5
fcbb5b1
d28cf8b
b4dd1a2
434ef45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,25 @@ | ||
| 0.3.0 | ||
| ----- | ||
| New functions and types for working with routines and partitioned relations. | ||
|
|
||
| ### PostgreSQL Version Support | ||
|
|
||
| **PostgreSQL 10 and 11 are no longer supported** as of this release. The 0.2.2→0.3.0 | ||
| update script adds values to existing enum types (`ALTER TYPE ... ADD VALUE`), which | ||
| cannot run inside an extension update script on PG11 or earlier (a restriction lifted | ||
| in PG12). Because a version that cannot be updated to is not truly supported, PG10 and | ||
| PG11 support is dropped entirely. | ||
|
|
||
| cat_tools 0.3.0 supports **PostgreSQL 12 through 18+**. | ||
|
|
||
| ### Changes | ||
|
|
||
| // TODO | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace placeholder TODO with actual 0.3.0 change bullets. Line 17 leaves the release section incomplete, which blocks usable release notes for this version. 🤖 Prompt for AI Agents |
||
|
|
||
| 0.2.2 | ||
| ----- | ||
| Compatibility release: fixes broken installs on PostgreSQL 11 and 12+, and | ||
| provides an upgrade path from 0.2.0 and 0.2.1. | ||
| provides an update path from 0.2.0 and 0.2.1. | ||
|
|
||
|
|
||
| ### PostgreSQL Version Support | ||
|
|
@@ -15,24 +33,24 @@ It fails on newer versions due to catalog schema changes: | |
| * **PG 12**: System catalog `oid` columns became visible as regular columns. Views | ||
| using `SELECT c.*` alongside an explicit `c.oid` alias produce duplicate column names. | ||
|
|
||
| cat_tools 0.2.2 installs and upgrades correctly on **PostgreSQL 9.2 through 18+** | ||
| cat_tools 0.2.2 installs and updates correctly on **PostgreSQL 9.2 through 18+** | ||
| (all currently supported versions). | ||
|
|
||
| ### Upgrade Path | ||
| ### Update Path | ||
|
|
||
| **You must upgrade cat_tools to 0.2.2 before upgrading PostgreSQL to version 11 or | ||
| later.** Upgrade via `ALTER EXTENSION cat_tools UPDATE`. | ||
| **You must update cat_tools to 0.2.2 before upgrading PostgreSQL to version 11 or | ||
| later.** Update via `ALTER EXTENSION cat_tools UPDATE`. | ||
|
|
||
| ### Upgrade Warning: Objects Depending on `cat_tools.column` | ||
| ### Update Warning: Objects Depending on `cat_tools.column` | ||
|
|
||
| `cat_tools.column` in 0.2.0 and 0.2.1 had extra columns: an unqualified `SELECT *` | ||
| across a `LEFT JOIN pg_constraint` accidentally pulled in all `pg_constraint` columns | ||
| (`conname`, `contype`, etc.). The 0.2.2 upgrade fixes the column list by dropping and | ||
| (`conname`, `contype`, etc.). The 0.2.2 update fixes the column list by dropping and | ||
| recreating `cat_tools.column` (and its underlying `_cat_tools.column`). | ||
|
|
||
| **If you have created any views, functions, or other objects that depend on | ||
| `cat_tools.column`, you must drop them before upgrading and recreate them | ||
| afterward.** The upgrade will fail with an error if any such dependent objects | ||
| `cat_tools.column`, you must drop them before updating and recreate them | ||
| afterward.** The update will fail with an error if any such dependent objects | ||
| exist — this is intentional, to avoid silently breaking user-defined objects. | ||
| After dropping your dependent objects, run `ALTER EXTENSION cat_tools UPDATE` again. | ||
|
|
||
|
|
@@ -56,25 +74,25 @@ to PostgreSQL 12 or later.** | |
|
|
||
| ### Changes | ||
|
|
||
| * `sql/cat_tools--0.1.4--0.1.5.sql` was empty; added `-- empty upgrade` placeholder so | ||
| PostgreSQL accepts it as a valid (no-op) upgrade script. | ||
| * `sql/cat_tools--0.1.4--0.1.5.sql` was empty; added `-- empty update` placeholder so | ||
| PostgreSQL accepts it as a valid (no-op) update script. | ||
| * `cat_tools.column` now exposes `attmissingval` as `text[]` (cast from `anyarray` on | ||
| PG 11+, or `NULL::text[]` on older versions). Any `SELECT *` on `cat_tools.column` | ||
| will now include this column. | ||
| * Views rebuilt using `omit_column()` to enumerate columns explicitly, avoiding both the | ||
| `anyarray` and duplicate-`oid` problems. | ||
| * A direct `0.2.0 → 0.2.2` upgrade path is provided (`cat_tools--0.2.0--0.2.2.sql`), | ||
| * A direct `0.2.0 → 0.2.2` update path is provided (`cat_tools--0.2.0--0.2.2.sql`), | ||
| which also applies all 0.2.1 function additions in a single step. | ||
| * `GRANT SELECT ON cat_tools.pg_extension_v TO cat_tools__usage` is now applied on the | ||
| upgrade path from 0.2.0 (it was absent in 0.2.0 and only added via the 0.2.1 upgrade). | ||
| update path from 0.2.0 (it was absent in 0.2.0 and only added via the 0.2.1 update). | ||
| * (Re-release) `_cat_tools.pg_class_v` now explicitly omits `relhasoids` (removed in PG12) | ||
| and `relhaspkey` (removed in PG17) to prevent `pg_upgrade` failures. | ||
| * (Re-release) `_cat_tools.pg_attribute_v` now explicitly omits `attcacheoff` (removed in | ||
| PG17) to prevent `pg_upgrade` failures. | ||
|
|
||
| 0.2.1 | ||
| ----- | ||
| Fix significant problems with a previous upgrade script. | ||
| Fix significant problems with a previous update script. | ||
|
|
||
| Add pg_extension_v and related functions. | ||
|
|
||
|
|
@@ -114,7 +132,7 @@ objects would cascede to the extension itself. | |
|
|
||
| 0.1.2 | ||
| ----- | ||
| =## BUGFIX: Install upgrade script | ||
| =## BUGFIX: Install update script | ||
|
|
||
| 0.1.1 | ||
| ----- | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |
| "name": "cat_tools", | ||
|
|
||
| "X_comment": "REQUIRED. Version of the distribution. http://pgxn.org/spec/#version", | ||
| "version": "0.2.2", | ||
| "version": "0.3.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update PGXN prerequisite version to PostgreSQL 12+ to match 0.3.0 support policy. With Suggested fix--- a/META.in.json
+++ b/META.in.json
@@
- "PostgreSQL": "9.2.0"
+ "PostgreSQL": "12.0"Based on learnings: “PostgreSQL 10 and 11 are dropped as of version 0.3.0… cat_tools 0.3.0 supports PG12+.” Also applies to: 40-40 🤖 Prompt for AI Agents |
||
|
|
||
| "X_comment": "REQUIRED. Short description of distribution.", | ||
| "abstract": "Tools for interfacing with the Postgres catalog", | ||
|
|
@@ -37,7 +37,7 @@ | |
| "file": "sql/cat_tools.sql", | ||
|
|
||
| "X_comment": "REQUIRED. Version the extension is at.", | ||
| "version": "0.2.2", | ||
| "version": "0.3.0", | ||
|
|
||
| "X_comment": "Optional: \"abstract\": Description of the extension.", | ||
| "abstract": "Tools for interfacing with the catalog", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Postgres-Extensions/cat_tools
Length of output: 207
🏁 Script executed:
Repository: Postgres-Extensions/cat_tools
Length of output: 6322
Harden
EXPECTED_VERSIONparsing and use exact version equality checks.Current checks can false-pass: empty
EXPECTED_VERSIONfrom parsing always passesgrep -qF, and partial matches pass too. Fail fast if parsing returns empty, then compare exact strings.sedextractsdefault_versiongrep -qFwith exact equality[ "$VERSION" = "$EXPECTED_VERSION" ]and validateVERSIONis not emptySuggested patch
- name: Set expected extension version run: | - echo "EXPECTED_VERSION=$(sed -n "s/^default_version = '\(.*\)'$/\1/p" cat_tools.control)" >> $GITHUB_ENV + EXPECTED_VERSION="$(sed -n "s/^default_version = '\(.*\)'$/\1/p" cat_tools.control)" + test -n "$EXPECTED_VERSION" || { echo "Failed to parse default_version from cat_tools.control"; exit 1; } + echo "EXPECTED_VERSION=$EXPECTED_VERSION" >> "$GITHUB_ENV" @@ - name: Verify extension version after upgrade run: | VERSION=$(psql -tAc "SELECT extversion FROM pg_extension WHERE extname = 'cat_tools'") echo "Extension version: ${VERSION:-<not found>}" - echo "$VERSION" | grep -qF "$EXPECTED_VERSION" + test -n "$VERSION" || { echo "cat_tools extension version not found"; exit 1; } + [ "$VERSION" = "$EXPECTED_VERSION" ] @@ - name: Set expected extension version run: | - echo "EXPECTED_VERSION=$(sed -n "s/^default_version = '\(.*\)'$/\1/p" cat_tools.control)" >> $GITHUB_ENV + EXPECTED_VERSION="$(sed -n "s/^default_version = '\(.*\)'$/\1/p" cat_tools.control)" + test -n "$EXPECTED_VERSION" || { echo "Failed to parse default_version from cat_tools.control"; exit 1; } + echo "EXPECTED_VERSION=$EXPECTED_VERSION" >> "$GITHUB_ENV" @@ - name: Test update from 0.2.2 (0.2.2→current path) run: | createdb cat_tools_from_022 psql -d cat_tools_from_022 -c "CREATE EXTENSION cat_tools VERSION '0.2.2'" psql -d cat_tools_from_022 -c "ALTER EXTENSION cat_tools UPDATE" VERSION=$(psql -d cat_tools_from_022 -tAc "SELECT extversion FROM pg_extension WHERE extname = 'cat_tools'") echo "Version after 0.2.2 update: ${VERSION:-<not found>}" - echo "$VERSION" | grep -qF "$EXPECTED_VERSION" + test -n "$VERSION" || { echo "cat_tools extension version not found after update"; exit 1; } + [ "$VERSION" = "$EXPECTED_VERSION" ]🤖 Prompt for AI Agents