Repository navigation
Require cat_tools 0.3.0 or later, with a clear error otherwise - #48
jnasbyupgrade merged 2 commits into
Conversation
The code calls cat_tools.routine__parse_arg_types_text(), which only exists from cat_tools 0.3.0, so an older cat_tools failed obscurely at use time. Check the installed version up front in the install and 0.1.0 update scripts, and declare the floor in META.in.json.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
Claude finished @jnasbyupgrade's task in 11s —— View job Code review: PR #48No blocking issues found. I read the diff but didn't run the tests. Minor, non-blocking
Looks good
|
| DECLARE | ||
| c_version CONSTANT text := (SELECT extversion FROM pg_catalog.pg_extension WHERE extname = 'cat_tools'); | ||
| BEGIN | ||
| IF c_version ~ '^[0-9]+(\.[0-9]+)*$' AND string_to_array(c_version, '.')::int[] < '{0,3,0}' THEN |
There was a problem hiding this comment.
We don't care about the last digit, and that's what's most likely to contain non-number. Ignore it.
|
Claude finished @jnasbyupgrade's task in 12s —— View job Code review: PR #48No blocking issues found. I read the diff but didn't run the tests.
Minor, non-blocking: the update-script check is the same text as the install check, and its failure path isn't exercised, as the PR description says. Update scripts can't share code with the main script, so I think the duplication is acceptable. |
object_reference needs cat_tools 0.3.0 or later; an older cat_tools now fails
CREATE EXTENSION/ALTER EXTENSION UPDATEup front instead of at first use.sql/object_reference.sqland the 0.1.0 update script check the installed cat_tools version and raiseobject_not_in_prerequisite_statewith a hint toALTER EXTENSION cat_tools UPDATE. A non-numeric version such asstable(a development build) is let through.META.in.jsondeclares the runtime requirement ascat_tools0.3.0 (the control file'srequirescan't carry a version).test/build/expected/build.outchanges only in the line numbers of the script warnings it records.Tested: fresh install and 0.1.0 update on PG17; faking cat_tools 0.2.1 produces the error on install. The update-script check is the same text and its failure path isn't separately exercised.