Commit 1847644
Note: This PR was created with AI tools and a human.
This is an addendum to PR #2364 with three improvements.
Makefile:
- Replace awk-based synthetic version (minor+1) with an _upgrade_test
suffix (e.g., 1.7.0 -> 1.7.0_upgrade_test). The awk approach produced
numeric versions like 1.8.0 that could collide with real future upgrade
scripts, and the ::int[] cast in the SQL version lookup fails on
non-numeric version strings. The _upgrade_test suffix avoids both
issues and is unambiguously synthetic.
- Extend the generated cleanup script to also remove repo-root copies
of the synthetic files and to self-delete, preventing stale artifacts
from accumulating across repeated test runs.
Regression test (regress/sql/age_upgrade.sql):
- Simplify version lookup to directly select the _upgrade_test version
via LIKE '%_upgrade_test' instead of picking the highest non-default
version with string_to_array(version, '.')::int[] DESC. The old
approach would fail with a cast error on the _upgrade_test suffix and
was unnecessarily indirect — the test knows exactly what synthetic
version the Makefile installed.
modified: Makefile
modified: regress/expected/age_upgrade.out
modified: regress/sql/age_upgrade.sql
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 945a259 commit 1847644
3 files changed
Lines changed: 8 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 257 | + | |
| 258 | + | |
261 | 259 | | |
262 | | - | |
263 | 260 | | |
264 | 261 | | |
265 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 203 | + | |
| 204 | + | |
207 | 205 | | |
208 | | - | |
209 | 206 | | |
210 | 207 | | |
211 | 208 | | |
| |||
0 commit comments