pgrx icon indicating copy to clipboard operation
pgrx copied to clipboard

Enable developers to set a default Postgres version

Open timClicks opened this issue 4 years ago • 2 comments
trafficstars

A minor irritant with cargo pgx is that it requires a postgres version to be specified, e.g. pg10. It would be a little bit smoother if this could be set in config somewhere.

timClicks avatar Jul 29 '21 23:07 timClicks

Users can specify pg12 etc in their default-features to skip this in many commands, I agree we should support it nearly globally though.

Hoverbear avatar Sep 03 '21 20:09 Hoverbear

We touched on this in #165 and decided:

For all cargo pgx commands but cargo pgx package we should be able to infer a default Postgres either from an extension's manually set default-features = ["pg13"] or from the $PATH. Since cargo pgx package is mostly used by packagers we're going to have it require a --pg_config arg to avoid packagers building extensions for an unintended Postgres version.

Hoverbear avatar Sep 15 '21 21:09 Hoverbear