Skip to content

Commit

Permalink
Cut pgrx v0.11.1 (#1408)
Browse files Browse the repository at this point in the history
Hello. Welcome to pgrx v0.11.1, a bugfix release that hopefully
addresses a very annoying persistent problem for users, especially ones
that were trying to use pgrx with Postgres 16! My changes in
b992f55 now steer bindgen towards
including the exact compiler-header directory that we require, instead
of relying on clang-sys to guess the right directory in ways that can go
horribly wrong. Unfortunately, this may make our build step more brittle
in certain cases. Please report issues as they arise, so that we can
continue to refine our build system, and eventually fix this in bindgen
proper!

This new behavior can still be disabled by setting
`PGRX_BINDGEN_NO_DETECT_INCLUDES`, as it is still a form of
autodetecting includes, but if this release fixes your build that was
previously relying on that or any other easily-removed hack, please let
us know!

Also, thanks to LuminousMonkey, you can now use pgrx on illumos, an
operating system descended from Solaris, with no changes to your source
code!
  • Loading branch information
workingjubilee authored Nov 27, 2023
1 parent 7acb7f2 commit 733827a
Show file tree
Hide file tree
Showing 16 changed files with 781 additions and 461 deletions.
540 changes: 280 additions & 260 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions cargo-pgrx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[package]
name = "cargo-pgrx"
version = "0.11.0"
version = "0.11.1"
authors = ["PgCentral Foundation, Inc. <[email protected]>"]
license = "MIT"
description = "Cargo subcommand for 'pgrx' to make Postgres extension development easy"
Expand All @@ -33,8 +33,8 @@ semver = "1.0.20"
owo-colors = { version = "3.5.0", features = [ "supports-colors" ] }
env_proxy = "0.4.1"
num_cpus = "1.16.0"
pgrx-pg-config = { path = "../pgrx-pg-config", version = "=0.11.0" }
pgrx-sql-entity-graph = { path = "../pgrx-sql-entity-graph", version = "=0.11.0" }
pgrx-pg-config = { path = "../pgrx-pg-config", version = "=0.11.1" }
pgrx-sql-entity-graph = { path = "../pgrx-sql-entity-graph", version = "=0.11.1" }
prettyplease = "0.2.15"
proc-macro2 = { version = "1.0.69", features = [ "span-locations" ] }
quote = "1.0.33"
Expand Down
4 changes: 2 additions & 2 deletions cargo-pgrx/src/templates/cargo_toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ pg16 = ["pgrx/pg16", "pgrx-tests/pg16" ]
pg_test = []

[dependencies]
pgrx = "=0.11.0"
pgrx = "=0.11.1"

[dev-dependencies]
pgrx-tests = "=0.11.0"
pgrx-tests = "=0.11.1"

[profile.dev]
panic = "unwind"
Expand Down
4 changes: 2 additions & 2 deletions nix/templates/default/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ pg16 = ["pgrx/pg16", "pgrx-tests/pg16" ]
pg_test = []

[dependencies]
pgrx = "=0.11.0"
pgrx = "=0.11.1"

[dev-dependencies]
pgrx-tests = "=0.11.0"
pgrx-tests = "=0.11.1"
tempfile = "3.2.0"
once_cell = "1.7.2"

Expand Down
4 changes: 2 additions & 2 deletions pgrx-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[package]
name = "pgrx-macros"
version = "0.11.0"
version = "0.11.1"
authors = ["PgCentral Foundation, Inc. <[email protected]>"]
license = "MIT"
description = "Proc Macros for 'pgrx'"
Expand All @@ -31,7 +31,7 @@ rustc-args = ["--cfg", "docsrs"]
no-schema-generation = ["pgrx-sql-entity-graph/no-schema-generation"]

[dependencies]
pgrx-sql-entity-graph = { path = "../pgrx-sql-entity-graph", version = "=0.11.0" }
pgrx-sql-entity-graph = { path = "../pgrx-sql-entity-graph", version = "=0.11.1" }
proc-macro2 = "1.0.69"
quote = "1.0.33"
syn = { version = "1.0.109", features = [ "extra-traits", "full", "fold", "parsing" ] }
Expand Down
2 changes: 1 addition & 1 deletion pgrx-pg-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[package]
name = "pgrx-pg-config"
version = "0.11.0"
version = "0.11.1"
authors = ["PgCentral Foundation, Inc. <[email protected]>"]
license = "MIT"
description = "A Postgres pg_config wrapper for 'pgrx'"
Expand Down
8 changes: 4 additions & 4 deletions pgrx-pg-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[package]
name = "pgrx-pg-sys"
version = "0.11.0"
version = "0.11.1"
authors = ["PgCentral Foundation, Inc. <[email protected]>"]
license = "MIT"
description = "Generated Rust bindings for Postgres internals, for use with 'pgrx'"
Expand Down Expand Up @@ -40,8 +40,8 @@ rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
memoffset = "0.9.0"
pgrx-macros = { path = "../pgrx-macros/", version = "=0.11.0" }
pgrx-sql-entity-graph = { path = "../pgrx-sql-entity-graph/", version = "=0.11.0" }
pgrx-macros = { path = "../pgrx-macros/", version = "=0.11.1" }
pgrx-sql-entity-graph = { path = "../pgrx-sql-entity-graph/", version = "=0.11.1" }
serde = { version = "1.0", features = [ "derive" ] } # impls on pub types
# polyfill until #![feature(strict_provenance)] stabilizes
sptr = "0.3"
Expand All @@ -50,7 +50,7 @@ libc = "0.2"
[build-dependencies]
bindgen = { version = "0.68.1", default-features = false, features = ["runtime"] }
clang-sys = { version = "1", features = ["clang_6_0", "runtime"] }
pgrx-pg-config= { path = "../pgrx-pg-config/", version = "=0.11.0" }
pgrx-pg-config= { path = "../pgrx-pg-config/", version = "=0.11.1" }
proc-macro2 = "1.0.69"
quote = "1.0.33"
syn = { version = "1.0.109", features = [ "extra-traits", "full", "fold", "parsing" ] }
Expand Down
106 changes: 77 additions & 29 deletions pgrx-pg-sys/src/include/pg11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ pub const HAVE_DECL_FDATASYNC: u32 = 1;
pub const HAVE_DECL_F_FULLFSYNC: u32 = 0;
pub const HAVE_DECL_POSIX_FADVISE: u32 = 1;
pub const HAVE_DECL_SNPRINTF: u32 = 1;
pub const HAVE_DECL_STRLCAT: u32 = 0;
pub const HAVE_DECL_STRLCPY: u32 = 0;
pub const HAVE_DECL_STRLCAT: u32 = 1;
pub const HAVE_DECL_STRLCPY: u32 = 1;
pub const HAVE_DECL_STRNLEN: u32 = 1;
pub const HAVE_DECL_STRTOLL: u32 = 1;
pub const HAVE_DECL_STRTOULL: u32 = 1;
Expand Down Expand Up @@ -257,6 +257,8 @@ pub const HAVE_STRERROR: u32 = 1;
pub const HAVE_STRERROR_R: u32 = 1;
pub const HAVE_STRINGS_H: u32 = 1;
pub const HAVE_STRING_H: u32 = 1;
pub const HAVE_STRLCAT: u32 = 1;
pub const HAVE_STRLCPY: u32 = 1;
pub const HAVE_STRNLEN: u32 = 1;
pub const HAVE_STRONG_RANDOM: u32 = 1;
pub const HAVE_STRSIGNAL: u32 = 1;
Expand Down Expand Up @@ -319,7 +321,8 @@ pub const PG_KRB_SRVNAM: &[u8; 9] = b"postgres\0";
pub const PG_MAJORVERSION: &[u8; 3] = b"11\0";
pub const PG_VERSION: &[u8; 6] = b"11.21\0";
pub const PG_VERSION_NUM: u32 = 110021;
pub const PG_VERSION_STR : & [u8 ; 103] = b"PostgreSQL 11.21 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0" ;
pub const PG_VERSION_STR: &[u8; 87] =
b"PostgreSQL 11.21 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.1 20230801, 64-bit\0";
pub const RELSEG_SIZE: u32 = 131072;
pub const SIZEOF_BOOL: u32 = 1;
pub const SIZEOF_LONG: u32 = 8;
Expand Down Expand Up @@ -381,6 +384,7 @@ pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const __GLIBC_USE_C2X_STRTOL: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_60559_BFP__: u32 = 201404;
Expand All @@ -389,7 +393,7 @@ pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 35;
pub const __GLIBC_MINOR__: u32 = 38;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
Expand All @@ -401,7 +405,6 @@ pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const __GNUC_VA_LIST: u32 = 1;
pub const _BITS_TYPES_H: u32 = 1;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
Expand All @@ -420,6 +423,7 @@ pub const __struct_FILE_defined: u32 = 1;
pub const _IO_EOF_SEEN: u32 = 16;
pub const _IO_ERR_SEEN: u32 = 32;
pub const _IO_USER_LOCK: u32 = 32768;
pub const __cookie_io_functions_t_defined: u32 = 1;
pub const _IOFBF: u32 = 0;
pub const _IOLBF: u32 = 1;
pub const _IONBF: u32 = 2;
Expand All @@ -429,9 +433,9 @@ pub const SEEK_SET: u32 = 0;
pub const SEEK_CUR: u32 = 1;
pub const SEEK_END: u32 = 2;
pub const P_tmpdir: &[u8; 5] = b"/tmp\0";
pub const _BITS_STDIO_LIM_H: u32 = 1;
pub const L_tmpnam: u32 = 20;
pub const TMP_MAX: u32 = 238328;
pub const _BITS_STDIO_LIM_H: u32 = 1;
pub const FILENAME_MAX: u32 = 4096;
pub const L_ctermid: u32 = 9;
pub const FOPEN_MAX: u32 = 16;
Expand Down Expand Up @@ -890,6 +894,9 @@ pub const SOL_NFC: u32 = 280;
pub const SOL_KCM: u32 = 281;
pub const SOL_TLS: u32 = 282;
pub const SOL_XDP: u32 = 283;
pub const SOL_MPTCP: u32 = 284;
pub const SOL_MCTP: u32 = 285;
pub const SOL_SMC: u32 = 286;
pub const SOMAXCONN: u32 = 4096;
pub const _BITS_SOCKADDR_H: u32 = 1;
pub const _SS_SIZE: u32 = 128;
Expand Down Expand Up @@ -978,6 +985,9 @@ pub const SO_PREFER_BUSY_POLL: u32 = 69;
pub const SO_BUSY_POLL_BUDGET: u32 = 70;
pub const SO_NETNS_COOKIE: u32 = 71;
pub const SO_BUF_LOCK: u32 = 72;
pub const SO_RESERVE_MEM: u32 = 73;
pub const SO_TXREHASH: u32 = 74;
pub const SO_RCVMARK: u32 = 75;
pub const SO_TIMESTAMP: u32 = 29;
pub const SO_TIMESTAMPNS: u32 = 35;
pub const SO_TIMESTAMPING: u32 = 37;
Expand Down Expand Up @@ -1043,6 +1053,7 @@ pub const IP_PMTUDISC_DO: u32 = 2;
pub const IP_PMTUDISC_PROBE: u32 = 3;
pub const IP_PMTUDISC_INTERFACE: u32 = 4;
pub const IP_PMTUDISC_OMIT: u32 = 5;
pub const IP_LOCAL_PORT_RANGE: u32 = 51;
pub const SOL_IP: u32 = 0;
pub const IP_DEFAULT_MULTICAST_TTL: u32 = 1;
pub const IP_DEFAULT_MULTICAST_LOOP: u32 = 1;
Expand Down Expand Up @@ -1497,11 +1508,6 @@ pub const POSIX_FADV_SEQUENTIAL: u32 = 2;
pub const POSIX_FADV_WILLNEED: u32 = 3;
pub const POSIX_FADV_DONTNEED: u32 = 4;
pub const POSIX_FADV_NOREUSE: u32 = 5;
pub const AT_FDCWD: i32 = -100;
pub const AT_SYMLINK_NOFOLLOW: u32 = 256;
pub const AT_REMOVEDIR: u32 = 512;
pub const AT_SYMLINK_FOLLOW: u32 = 1024;
pub const AT_EACCESS: u32 = 512;
pub const _BITS_STAT_H: u32 = 1;
pub const _BITS_STRUCT_STAT_H: u32 = 1;
pub const __S_IFMT: u32 = 61440;
Expand Down Expand Up @@ -1547,6 +1553,11 @@ pub const R_OK: u32 = 4;
pub const W_OK: u32 = 2;
pub const X_OK: u32 = 1;
pub const F_OK: u32 = 0;
pub const AT_FDCWD: i32 = -100;
pub const AT_SYMLINK_NOFOLLOW: u32 = 256;
pub const AT_REMOVEDIR: u32 = 512;
pub const AT_SYMLINK_FOLLOW: u32 = 1024;
pub const AT_EACCESS: u32 = 512;
pub const F_ULOCK: u32 = 0;
pub const F_LOCK: u32 = 1;
pub const F_TLOCK: u32 = 2;
Expand Down Expand Up @@ -3379,7 +3390,6 @@ pub const RANGESTRAT_CONTAINED_BY: u32 = 8;
pub const RANGESTRAT_CONTAINS_ELEM: u32 = 16;
pub const RANGESTRAT_EQ: u32 = 18;
pub type pg_int64 = ::std::os::raw::c_long;
pub type va_list = __builtin_va_list;
pub type __gnuc_va_list = __builtin_va_list;
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
Expand Down Expand Up @@ -3570,6 +3580,40 @@ impl Default for _IO_FILE {
}
}
}
pub type cookie_read_function_t = ::std::option::Option<
unsafe extern "C" fn(
__cookie: *mut ::std::os::raw::c_void,
__buf: *mut ::std::os::raw::c_char,
__nbytes: usize,
) -> __ssize_t,
>;
pub type cookie_write_function_t = ::std::option::Option<
unsafe extern "C" fn(
__cookie: *mut ::std::os::raw::c_void,
__buf: *const ::std::os::raw::c_char,
__nbytes: usize,
) -> __ssize_t,
>;
pub type cookie_seek_function_t = ::std::option::Option<
unsafe extern "C" fn(
__cookie: *mut ::std::os::raw::c_void,
__pos: *mut __off64_t,
__w: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
pub type cookie_close_function_t = ::std::option::Option<
unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _IO_cookie_io_functions_t {
pub read: cookie_read_function_t,
pub write: cookie_write_function_t,
pub seek: cookie_seek_function_t,
pub close: cookie_close_function_t,
}
pub type cookie_io_functions_t = _IO_cookie_io_functions_t;
pub type va_list = __gnuc_va_list;
pub type off_t = __off_t;
pub type fpos_t = __fpos_t;
pub type _Float32 = f32;
Expand Down Expand Up @@ -4358,13 +4402,6 @@ impl Default for ip_opts {
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ip_mreqn {
pub imr_multiaddr: in_addr,
pub imr_address: in_addr,
pub imr_ifindex: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct in_pktinfo {
pub ipi_ifindex: ::std::os::raw::c_int,
pub ipi_spec_dst: in_addr,
Expand All @@ -4391,6 +4428,7 @@ pub const IPPROTO_BEETPH: _bindgen_ty_5 = 94;
pub const IPPROTO_ENCAP: _bindgen_ty_5 = 98;
pub const IPPROTO_PIM: _bindgen_ty_5 = 103;
pub const IPPROTO_COMP: _bindgen_ty_5 = 108;
pub const IPPROTO_L2TP: _bindgen_ty_5 = 115;
pub const IPPROTO_SCTP: _bindgen_ty_5 = 132;
pub const IPPROTO_UDPLITE: _bindgen_ty_5 = 136;
pub const IPPROTO_MPLS: _bindgen_ty_5 = 137;
Expand Down Expand Up @@ -4499,6 +4537,13 @@ pub struct ip_mreq {
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ip_mreqn {
pub imr_multiaddr: in_addr,
pub imr_address: in_addr,
pub imr_ifindex: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ip_mreq_source {
pub imr_multiaddr: in_addr,
pub imr_interface: in_addr,
Expand Down Expand Up @@ -25462,6 +25507,9 @@ extern "C" {
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
pub fn arc4random() -> __uint32_t;
pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __size: usize);
pub fn arc4random_uniform(__upper_bound: __uint32_t) -> __uint32_t;
pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
pub fn atexit(__func: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
pub fn at_quick_exit(
Expand All @@ -25472,6 +25520,16 @@ extern "C" {
__s2: *const ::std::os::raw::c_void,
__n: usize,
) -> ::std::os::raw::c_int;
pub fn strlcpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_ulong;
pub fn strlcat(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_ulong;
pub fn ExceptionalCondition(
conditionName: *const ::std::os::raw::c_char,
errorType: *const ::std::os::raw::c_char,
Expand Down Expand Up @@ -25809,16 +25867,6 @@ extern "C" {
pub fn __fminl(__x: u128, __y: u128) -> u128;
pub fn __fmal(__x: u128, __y: u128, __z: u128) -> u128;
pub fn __scalbl(__x: u128, __n: u128) -> u128;
pub fn strlcat(
dst: *mut ::std::os::raw::c_char,
src: *const ::std::os::raw::c_char,
siz: usize,
) -> usize;
pub fn strlcpy(
dst: *mut ::std::os::raw::c_char,
src: *const ::std::os::raw::c_char,
siz: usize,
) -> usize;
pub fn pg_qsort(
base: *mut ::std::os::raw::c_void,
nel: usize,
Expand Down
Loading

0 comments on commit 733827a

Please sign in to comment.