Fix pg_regress_path() for PostgreSQL 13-16 on Windows#2240
Draft
willibrandon wants to merge 1 commit intopgcentralfoundation:developfrom
Draft
Fix pg_regress_path() for PostgreSQL 13-16 on Windows#2240willibrandon wants to merge 1 commit intopgcentralfoundation:developfrom
willibrandon wants to merge 1 commit intopgcentralfoundation:developfrom
Conversation
…alfoundation#2237) This test verifies that pg_regress_path() returns a path to an existing pg_regress executable for all configured PostgreSQL versions. Currently fails on Windows with PostgreSQL 13-16 because EnterpriseDB precompiled binaries place pg_regress in /bin/ rather than /lib/pgxs/src/test/regress/. PostgreSQL 17+ uses Meson which installs to /lib/pgxs/src/test/regress/. This commit adds: - Test in pgrx-pg-config that checks all configured PG versions - CI step to run this test on Windows after cargo pgrx init
cbandy
approved these changes
Jan 24, 2026
|
|
||
| let pg_regress_path = pg_config.pg_regress_path()?; | ||
| // Add executable suffix for Windows | ||
| let pg_regress_exe = pg_regress_path.with_extension(if cfg!(windows) { "exe" } else { "" }); |
Contributor
There was a problem hiding this comment.
Methods like initdb_path and pg_ctl_path already append the suffix. I suspect pg_regress_path should do the same.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2237
pg_regress_path()fails on Windows with PostgreSQL 13-16 because EnterpriseDB precompiled binaries placepg_regress.exein/bin/rather than/lib/pgxs/src/test/regress/. PostgreSQL 17+ (Meson builds) installs to the latter location.This PR:
pg_regress_path()returns an existing executableStatus: Draft - test currently fails on pg13-16, demonstrating the issue. Fix to follow.