Skip to content

Conversation

@charmitro
Copy link
Contributor

The 'cargo pgrx new' command was creating pg_regress directories at the project root (./pg_regress/), while 'cargo pgrx regress' expected them under the tests directory (./tests/pg_regress/). This inconsistency caused immediate failures when running regression tests on newly created projects.

Fix the path mismatch by updating 'cargo pgrx new' to create the pg_regress directory structure under tests/, aligning with where 'cargo pgrx regress' expects to find them. This follows Rust's convention of organizing test files in a tests/ directory.

Also update the documentation and the hooks example to use the consistent path structure.

Fixes: #2136 ("Inconsistencies in the pg_regress path")

@daamien
Copy link
Contributor

daamien commented Sep 2, 2025

wow that was fast :)

Thanks a lot !

@daamien
Copy link
Contributor

daamien commented Sep 2, 2025

@charmitro : Don't ignore the .gitignore file ;-)

cargo-pgrx/src/templates/gitignore

The 'cargo pgrx new' command was creating pg_regress directories at
the project root (./pg_regress/), while 'cargo pgrx regress' expected
them under the tests directory (./tests/pg_regress/). This
inconsistency caused immediate failures when running regression tests
on newly created projects.

Fix the path mismatch by updating 'cargo pgrx new' to create the
pg_regress directory structure under tests/, aligning with where
'cargo pgrx regress' expects to find them. This follows Rust's
convention of organizing test files in a tests/ directory.

Also update the documentation and the hooks example to use the
consistent path structure.

Fixes: pgcentralfoundation#2136 ("Inconsistencies in the pg_regress path")

Signed-off-by: Charalampos Mitrodimas <[email protected]>
@charmitro charmitro force-pushed the regress-path-inconsistency branch from 48676d5 to 44d0966 Compare September 2, 2025 08:58
@charmitro
Copy link
Contributor Author

@charmitro : Don't ignore the .gitignore file ;-)

cargo-pgrx/src/templates/gitignore

Oops, done!

Copy link
Contributor

@eeeebbbbrrrr eeeebbbbrrrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@eeeebbbbrrrr eeeebbbbrrrr merged commit 706388f into pgcentralfoundation:develop Sep 25, 2025
16 checks passed
eeeebbbbrrrr added a commit that referenced this pull request Sep 25, 2025
Welcome to pgrx v0.16.1. This is a relatively minor release but does add
support for Postgres v18, released on September 25, 2025.

As always, install/update `cargo-pgrx` with `cargo install cargo-pgrx
--version 0.16.1 --locked`. Then run `cargo pgrx update` in all your
extension crates.

To pick up Postgres v18, you'll need to run (at least) `cargo pgrx init`
and then add the `pg18` feature flag to your extension's `Cargo.toml`.


## What's Changed

* remove polyfill crates by @usamoi in
#2128
* Example : register PostgreSQL hooks by @daamien in
#2125
* add more WAL/replication headers by @eeeebbbbrrrr in
#2130
* remove home, supports-color 0.2 and update toml, color-eyre by @usamoi
in #2133
* cargo-pgrx: fix pg_regress path inconsistency by @charmitro in
#2137
* fix big endian by @usamoi in
#2132
* Fixing CI by @eeeebbbbrrrr in
#2143
* pg18 support by @eeeebbbbrrrr in
#2144


**Full Changelog**:
v0.16.0...v0.16.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistencies in the pg_regress path

3 participants