Skip to content

Commit

Permalink
feat(pgrx): support pg16, update pgrx
Browse files Browse the repository at this point in the history
This commit updates pgrx to 0.11.2 and adds support for Postgres
16 (https://www.postgresql.org/docs/16/).

Signed-off-by: vados <[email protected]>
  • Loading branch information
t3hmrman committed Dec 11, 2023
1 parent ab914ce commit d6342da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pg12 = ["pgrx/pg12", "pgrx-tests/pg12"]
pg13 = ["pgrx/pg13", "pgrx-tests/pg13"]
pg14 = ["pgrx/pg14", "pgrx-tests/pg14"]
pg15 = ["pgrx/pg15", "pgrx-tests/pg15"]
pg16 = ["pgrx/pg16", "pgrx-tests/pg16"]
pg_test = []

[dependencies]
Expand Down Expand Up @@ -105,3 +106,12 @@ assets = [
]
requires = { postgresql-server = "> 15", glibc = "*" }
release = "pg15"

[package.metadata.generate-rpm.variants.pg16]
assets = [
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/lib/postgresql/pg_idkit.so", dest = "/usr/lib64/pgsql/pg_idkit.so", mode = "755" },
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.1.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.1.0.sql", mode = "755" },
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit.control", dest = "/usr/share/pgsql/extension/pg_idkit.control", mode = "755" },
]
requires = { postgresql-server = "> 15", glibc = "*" }
release = "pg16"
6 changes: 3 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ cargo_features_arg := if cargo_features != "" {

changelog_file_path := absolute_path(justfile_directory() / "CHANGELOG")

pkg_pg_version := env_var_or_default("PKG_PG_VERSION", "15.5")
pkg_pg_version := env_var_or_default("PKG_PG_VERSION", "16.1")
pkg_pg_config_path := env_var_or_default("PKG_PG_CONFIG_PATH", "~/.pgrx/" + pkg_pg_version + "/pgrx-install/bin/pg_config")

pgrx_pg_version := env_var_or_default("PGRX_PG_VERSION", "pg15")
pgrx_pg_version := env_var_or_default("PGRX_PG_VERSION", "pg16")
pgrx_pkg_path_prefix := env_var_or_default("PGRX_PKG_PATH_PREFIX", "target")
pgrx_pkg_output_dir := pgrx_pkg_path_prefix / "release" / "pg_idkit-" + pgrx_pg_version / "home" / user / ".pgrx" / pkg_pg_version / "pgrx-install"

Expand Down Expand Up @@ -123,7 +123,7 @@ test:

container_img_arch := env_var_or_default("CONTAINER_IMAGE_ARCH", "amd64")

pg_image_version := env_var_or_default("POSTGRES_IMAGE_VERSION", "15.5")
pg_image_version := env_var_or_default("POSTGRES_IMAGE_VERSION", "16.1")
pg_os_image_version := env_var_or_default("POSTGRES_OS_IMAGE_VERSION", "alpine3.18")

pgidkit_image_name := env_var_or_default("PGIDKIT_IMAGE_NAME", "ghcr.io/vadosware/pg_idkit")
Expand Down

0 comments on commit d6342da

Please sign in to comment.