pgrx
pgrx copied to clipboard
Feature request: cargo pgx init --pg12=https://ftp.postgresql.org/pub/source/v12.6/postgresql-12.6.tar.bz2
It would be very helpful for Nix-based environments (or for reproducible builds in general) to specify an exact version of postgres to use during the cargo pgx init phase.
I have tried using a nix-shell with cargo pgx init --pg12=${postgresql_12}/bin/pg_config, however, since the nix store paths are not writable, this doesn't help much (e.g. pgx run, pgx install and pgx package will not work). I have also tried copying the nix postgresql_12 to a local writable directory, then using that directory during pgx init, however, the pg_config of that writable copy will still produce absolute nix store path outputs (nix has a very opinionated method to guarantee reproducible builds). Using pgx init --pg12=download will not produce reproducible builds in a clean CI environment.
Also see comment https://github.com/zombodb/pgx/issues/105#issuecomment-828832451 by @Hoverbear.
Please consider allowing init to accept a specific download url (or a part of the url), or alternatively, to accept a full version number.
Examples:
cargo pgx init --pg12=https://ftp.postgresql.org/pub/source/v12.6/postgresql-12.6.tar.bz2
cargo pgx init --pg12=12.6
Hey @W1M0R , I think this is a good feature suggestion!