pgrx
pgrx copied to clipboard
Enable developers to set a default Postgres version
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.
Users can specify pg12 etc in their default-features to skip this in many commands, I agree we should support it nearly globally though.
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.