Skip to content

Remove the $libdir/ prefix from module_pathname#2051

Merged
eeeebbbbrrrr merged 1 commit intopgcentralfoundation:developfrom
theory:rm-libdir-prefix
May 6, 2025
Merged

Remove the $libdir/ prefix from module_pathname#2051
eeeebbbbrrrr merged 1 commit intopgcentralfoundation:developfrom
theory:rm-libdir-prefix

Conversation

@theory
Copy link
Contributor

@theory theory commented Apr 28, 2025

It limits the search to PKGLIBDIR; if anyone installs it into another directory in dynamic_library_path, Postgres won't be able to find it.

Details.

I think pgrx should also consider adding something equivalent to the PGRX prefix param to allow the sharedir and pkglibdir files to be installed somewhere other than where pg_config suggests to properly support dynamic_library_path and the new extension_control_path configs.

It limits the search to PKGLIBDIR; if anyone installs it into another
directory in `dynamic_library_path`, Postgres won't be able to find it.
@eeeebbbbrrrr
Copy link
Contributor

This is probably just fine to merge, so I'll go ahead and do that.

I'm not up-to-date on dynamic_library_path and extension_control_path, so I'll have to do some reading. What did you have in mind, @theory?

@eeeebbbbrrrr eeeebbbbrrrr merged commit 5438875 into pgcentralfoundation:develop May 6, 2025
15 checks passed
@theory
Copy link
Contributor Author

theory commented May 6, 2025

Right now pgrx exclusively installs shared libraries in PKGLIBDIR and control files and SQL file sin SHAREDIR. What it needs, I think, is a --prefix option that installs them under a different prefix. The analog is the PGXS prefix= option, documented here (search for "You can select a separate directory prefix"). For better or worse, it should probably have the same behavior, adding postgresql to the end if neither postgres nor pgsql appear in the value. Then pgrx should append share for the sharedir, share/extensions for the control and SQL files, share/$dir if the Control file directory option is specified. It should append lib for pkglibdir. Presumably doc files would go under $prefix/docs.

eeeebbbbrrrr added a commit that referenced this pull request May 7, 2025
Welcome to pgrx v0.14.2. This is a minor release that fixes a few bugs
and also adds a big new feature: support for `pg_regress`-based
regression tests.

As always, please update with `cargo install cargo-pgrx --version 0.14.2
--locked` and update your extension `Cargo.toml` files with `cargo pgrx
upgrade`.

For the `pg_regress` regression test support, there's a new `cargo pgrx
regress` subcommand, and it's documented in [cargo-pgrx's
readme](https://github.com/pgcentralfoundation/pgrx/blob/develop/cargo-pgrx/README.md#testing-with-regression-tests).


## What's Changed

* Remove the `$libdir/` prefix from module_pathname by @theory in
#2051

This will help with the upcoming Postgres v18 and generally makes
pgrx-based extensions less restrictive with regard to how they're
installed.

* initial support for `pg_regress`-based tests by @eeeebbbbrrrr in
#2058

(editor's node: I full expect users to uncover UX nits with this and am
more than happy to entertain any ideas that help to improve workflows,
either locally during development or in CI. Feel free to open issues
about it.)

### More Bindings

* Include `pg_statistic_ext` catalog by @ArArgon in
#2053

### Bug Fixes

* check `tgnargs` in `extra_args` by @usamoi in
#2046

### Code Cleanup

* Added absolute path to call `<Self as ::pgrx::datum::FromDatum>::` by
@LucaCappelletti94 in
#2050
* Removed duplicate ok check by @YohDeadfall in
#2044

## New Contributors
* @LucaCappelletti94 made their first contribution in
#2050
* @ArArgon made their first contribution in
#2053

## Thanks

Shoutout to @philippemnoel of @paradedb for paying me to implement the
`pg_regress` support. ❤️

**Full Changelog**:
v0.14.1...v0.14.2
KenjiBrown pushed a commit to SoftwareLibreMx/pgrx that referenced this pull request May 27, 2025
…2051)

It limits the search to PKGLIBDIR; if anyone installs it into another
directory in `dynamic_library_path`, Postgres won't be able to find it.

[Details](https://justatheory.com/2025/04/update-control/).
KenjiBrown pushed a commit to SoftwareLibreMx/pgrx that referenced this pull request May 27, 2025
Welcome to pgrx v0.14.2. This is a minor release that fixes a few bugs
and also adds a big new feature: support for `pg_regress`-based
regression tests.

As always, please update with `cargo install cargo-pgrx --version 0.14.2
--locked` and update your extension `Cargo.toml` files with `cargo pgrx
upgrade`.

For the `pg_regress` regression test support, there's a new `cargo pgrx
regress` subcommand, and it's documented in [cargo-pgrx's
readme](https://github.com/pgcentralfoundation/pgrx/blob/develop/cargo-pgrx/README.md#testing-with-regression-tests).


## What's Changed

* Remove the `$libdir/` prefix from module_pathname by @theory in
pgcentralfoundation#2051

This will help with the upcoming Postgres v18 and generally makes
pgrx-based extensions less restrictive with regard to how they're
installed.

* initial support for `pg_regress`-based tests by @eeeebbbbrrrr in
pgcentralfoundation#2058

(editor's node: I full expect users to uncover UX nits with this and am
more than happy to entertain any ideas that help to improve workflows,
either locally during development or in CI. Feel free to open issues
about it.)

### More Bindings

* Include `pg_statistic_ext` catalog by @ArArgon in
pgcentralfoundation#2053

### Bug Fixes

* check `tgnargs` in `extra_args` by @usamoi in
pgcentralfoundation#2046

### Code Cleanup

* Added absolute path to call `<Self as ::pgrx::datum::FromDatum>::` by
@LucaCappelletti94 in
pgcentralfoundation#2050
* Removed duplicate ok check by @YohDeadfall in
pgcentralfoundation#2044

## New Contributors
* @LucaCappelletti94 made their first contribution in
pgcentralfoundation#2050
* @ArArgon made their first contribution in
pgcentralfoundation#2053

## Thanks

Shoutout to @philippemnoel of @paradedb for paying me to implement the
`pg_regress` support. ❤️

**Full Changelog**:
pgcentralfoundation/pgrx@v0.14.1...v0.14.2
daamien pushed a commit to daamien/pgrx that referenced this pull request Dec 15, 2025
…2051)

It limits the search to PKGLIBDIR; if anyone installs it into another
directory in `dynamic_library_path`, Postgres won't be able to find it.

[Details](https://justatheory.com/2025/04/update-control/).
daamien pushed a commit to daamien/pgrx that referenced this pull request Dec 15, 2025
Welcome to pgrx v0.14.2. This is a minor release that fixes a few bugs
and also adds a big new feature: support for `pg_regress`-based
regression tests.

As always, please update with `cargo install cargo-pgrx --version 0.14.2
--locked` and update your extension `Cargo.toml` files with `cargo pgrx
upgrade`.

For the `pg_regress` regression test support, there's a new `cargo pgrx
regress` subcommand, and it's documented in [cargo-pgrx's
readme](https://github.com/pgcentralfoundation/pgrx/blob/develop/cargo-pgrx/README.md#testing-with-regression-tests).


## What's Changed

* Remove the `$libdir/` prefix from module_pathname by @theory in
pgcentralfoundation#2051

This will help with the upcoming Postgres v18 and generally makes
pgrx-based extensions less restrictive with regard to how they're
installed.

* initial support for `pg_regress`-based tests by @eeeebbbbrrrr in
pgcentralfoundation#2058

(editor's node: I full expect users to uncover UX nits with this and am
more than happy to entertain any ideas that help to improve workflows,
either locally during development or in CI. Feel free to open issues
about it.)

### More Bindings

* Include `pg_statistic_ext` catalog by @ArArgon in
pgcentralfoundation#2053

### Bug Fixes

* check `tgnargs` in `extra_args` by @usamoi in
pgcentralfoundation#2046

### Code Cleanup

* Added absolute path to call `<Self as ::pgrx::datum::FromDatum>::` by
@LucaCappelletti94 in
pgcentralfoundation#2050
* Removed duplicate ok check by @YohDeadfall in
pgcentralfoundation#2044

## New Contributors
* @LucaCappelletti94 made their first contribution in
pgcentralfoundation#2050
* @ArArgon made their first contribution in
pgcentralfoundation#2053

## Thanks

Shoutout to @philippemnoel of @paradedb for paying me to implement the
`pg_regress` support. ❤️

**Full Changelog**:
pgcentralfoundation/pgrx@v0.14.1...v0.14.2
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.

2 participants