diff --git a/Cargo.lock b/Cargo.lock index 05303f519..fd1437e97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "cargo-pgrx" -version = "0.18.0" +version = "0.18.1" dependencies = [ "bzip2", "cargo-edit", @@ -2393,7 +2393,7 @@ dependencies = [ [[package]] name = "pgrx" -version = "0.18.0" +version = "0.18.1" dependencies = [ "bitflags 2.11.1", "bitvec", @@ -2412,7 +2412,7 @@ dependencies = [ [[package]] name = "pgrx-bench" -version = "0.18.0" +version = "0.18.1" dependencies = [ "criterion", "oorandom", @@ -2423,7 +2423,7 @@ dependencies = [ [[package]] name = "pgrx-bindgen" -version = "0.18.0" +version = "0.18.1" dependencies = [ "bindgen", "cc", @@ -2440,7 +2440,7 @@ dependencies = [ [[package]] name = "pgrx-macros" -version = "0.18.0" +version = "0.18.1" dependencies = [ "pgrx-sql-entity-graph", "proc-macro2", @@ -2451,7 +2451,7 @@ dependencies = [ [[package]] name = "pgrx-pg-config" -version = "0.18.0" +version = "0.18.1" dependencies = [ "cargo_toml", "codepage", @@ -2469,7 +2469,7 @@ dependencies = [ [[package]] name = "pgrx-pg-sys" -version = "0.18.0" +version = "0.18.1" dependencies = [ "cee-scape", "libc", @@ -2481,7 +2481,7 @@ dependencies = [ [[package]] name = "pgrx-sql-entity-graph" -version = "0.18.0" +version = "0.18.1" dependencies = [ "convert_case", "eyre", @@ -2497,7 +2497,7 @@ dependencies = [ [[package]] name = "pgrx-tests" -version = "0.18.0" +version = "0.18.1" dependencies = [ "clap-cargo 0.14.1", "eyre", @@ -2519,7 +2519,7 @@ dependencies = [ [[package]] name = "pgrx-unit-tests" -version = "0.18.0" +version = "0.18.1" dependencies = [ "eyre", "libc", diff --git a/Cargo.toml b/Cargo.toml index 53378aec0..dd52efda1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,18 +33,18 @@ repository = "https://github.com/pgcentralfoundation/pgrx/" homepage = "https://github.com/pgcentralfoundation/pgrx/" # TODO: all crates should use this version rather than copy it # See https://github.com/pgcentralfoundation/pgrx/pull/2100 comments -version = "0.18.0" +version = "0.18.1" [workspace.metadata.local-install] cargo-pgrx = { path = "cargo-pgrx" } [workspace.dependencies] -pgrx-bench = { path = "./pgrx-bench", version = "=0.18.0" } -pgrx-macros = { path = "./pgrx-macros", version = "=0.18.0" } -pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.18.0" } -pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.18.0" } -pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.18.0" } -pgrx-bindgen = { path = "./pgrx-bindgen", version = "=0.18.0" } +pgrx-bench = { path = "./pgrx-bench", version = "=0.18.1" } +pgrx-macros = { path = "./pgrx-macros", version = "=0.18.1" } +pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.18.1" } +pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.18.1" } +pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.18.1" } +pgrx-bindgen = { path = "./pgrx-bindgen", version = "=0.18.1" } cargo_metadata = "0.18.0" cargo-edit = "=0.13.2" # format-preserving edits to cargo.toml diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index c09c1190a..87d22a023 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "cargo-pgrx" -version = "0.18.0" +version = "0.18.1" authors.workspace = true license.workspace = true description = "Cargo subcommand for 'pgrx' to make Postgres extension development easy" diff --git a/cargo-pgrx/src/templates/cargo_toml b/cargo-pgrx/src/templates/cargo_toml index 5f085c513..6c0d64909 100644 --- a/cargo-pgrx/src/templates/cargo_toml +++ b/cargo-pgrx/src/templates/cargo_toml @@ -18,15 +18,15 @@ pg_test = [] pg_bench = ["dep:pgrx-bench"] [dependencies] -pgrx = "=0.18.0" +pgrx = "=0.18.1" [dependencies.pgrx-bench] -version = "=0.18.0" +version = "=0.18.1" optional = true [dev-dependencies] [dev-dependencies.pgrx-tests] -version = "=0.18.0" +version = "=0.18.1" [profile.dev] panic = "unwind" diff --git a/pgrx-bench/Cargo.toml b/pgrx-bench/Cargo.toml index 2641a3453..2060d9a93 100644 --- a/pgrx-bench/Cargo.toml +++ b/pgrx-bench/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-bench" -version = "0.18.0" +version = "0.18.1" authors.workspace = true license.workspace = true description = "Benchmark runtime support for pgrx extensions" diff --git a/pgrx-bindgen/Cargo.toml b/pgrx-bindgen/Cargo.toml index 842f07996..74d4172ee 100644 --- a/pgrx-bindgen/Cargo.toml +++ b/pgrx-bindgen/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pgrx-bindgen" description = "additional bindgen support for pgrx" -version = "0.18.0" +version = "0.18.1" edition.workspace = true license.workspace = true homepage = "https://github.com/pgcentralfoundation/pgrx" diff --git a/pgrx-macros/Cargo.toml b/pgrx-macros/Cargo.toml index 609cf90e3..aa386cf5e 100644 --- a/pgrx-macros/Cargo.toml +++ b/pgrx-macros/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-macros" -version = "0.18.0" +version = "0.18.1" authors.workspace = true license.workspace = true description = "Proc Macros for 'pgrx'" diff --git a/pgrx-pg-config/Cargo.toml b/pgrx-pg-config/Cargo.toml index c1ff43572..32f7877bc 100644 --- a/pgrx-pg-config/Cargo.toml +++ b/pgrx-pg-config/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-pg-config" -version = "0.18.0" +version = "0.18.1" authors.workspace = true license.workspace = true description = "A Postgres pg_config wrapper for 'pgrx'" diff --git a/pgrx-pg-sys/Cargo.toml b/pgrx-pg-sys/Cargo.toml index 43c57af67..e685cd64b 100644 --- a/pgrx-pg-sys/Cargo.toml +++ b/pgrx-pg-sys/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-pg-sys" -version = "0.18.0" +version = "0.18.1" authors.workspace = true license.workspace = true description = "Generated Rust bindings for Postgres internals, for use with 'pgrx'" diff --git a/pgrx-pg-sys/src/include/pg13.rs b/pgrx-pg-sys/src/include/pg13.rs index 11cdcfe33..80cefa53c 100644 --- a/pgrx-pg-sys/src/include/pg13.rs +++ b/pgrx-pg-sys/src/include/pg13.rs @@ -193,7 +193,7 @@ pub const PG_MINORVERSION_NUM: u32 = 23; pub const PG_USE_STDBOOL: u32 = 1; pub const PG_VERSION: &::core::ffi::CStr = c"13.23"; pub const PG_VERSION_NUM: u32 = 130023; -pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 13.23 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, 64-bit" ; +pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 13.23 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0, 64-bit" ; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; pub const SIZEOF_LONG: u32 = 8; @@ -5110,7 +5110,8 @@ pub const RANGESTRAT_CONTAINS_ELEM: u32 = 16; pub const RANGESTRAT_EQ: u32 = 18; pub const PGERROR: u32 = 20; pub type pg_int64 = ::core::ffi::c_long; -pub type va_list = __builtin_va_list; +pub type __gnuc_va_list = __builtin_va_list; +pub type __uint64_t = ::core::ffi::c_ulong; pub type __uid_t = ::core::ffi::c_uint; pub type __gid_t = ::core::ffi::c_uint; pub type __ino_t = ::core::ffi::c_ulong; @@ -5157,7 +5158,9 @@ pub struct _IO_FILE { pub _markers: *mut _IO_marker, pub _chain: *mut _IO_FILE, pub _fileno: ::core::ffi::c_int, - pub _flags2: ::core::ffi::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub _short_backupbuf: [::core::ffi::c_char; 1usize], pub _old_offset: __off_t, pub _cur_column: ::core::ffi::c_ushort, pub _vtable_offset: ::core::ffi::c_schar, @@ -5168,9 +5171,11 @@ pub struct _IO_FILE { pub _wide_data: *mut _IO_wide_data, pub _freeres_list: *mut _IO_FILE, pub _freeres_buf: *mut ::core::ffi::c_void, - pub __pad5: usize, + pub _prevchain: *mut *mut _IO_FILE, pub _mode: ::core::ffi::c_int, - pub _unused2: [::core::ffi::c_char; 20usize], + pub _unused3: ::core::ffi::c_int, + pub _total_written: __uint64_t, + pub _unused2: [::core::ffi::c_char; 8usize], } impl Default for _IO_FILE { fn default() -> Self { @@ -5181,6 +5186,51 @@ impl Default for _IO_FILE { } } } +impl _IO_FILE { + #[inline] + pub fn _flags2(&self) -> ::core::ffi::c_int { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set__flags2(&mut self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn _flags2_raw(this: *const Self) -> ::core::ffi::c_int { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set__flags2_raw(this: *mut Self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(_flags2: ::core::ffi::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let _flags2: u32 = unsafe { ::core::mem::transmute(_flags2) }; + _flags2 as u64 + }); + __bindgen_bitfield_unit + } +} +pub type va_list = __gnuc_va_list; pub type off_t = __off_t; pub type gid_t = __gid_t; pub type mode_t = __mode_t; @@ -15704,7 +15754,7 @@ pub mod TypeFuncClass { pub const TYPEFUNC_OTHER: Type = 4; } pub type sig_atomic_t = __sig_atomic_t; -pub mod _bindgen_ty_19 { +pub mod _bindgen_ty_20 { pub type Type = ::core::ffi::c_uint; pub const SIGEV_SIGNAL: Type = 0; pub const SIGEV_NONE: Type = 1; @@ -25998,7 +26048,7 @@ pub mod PLpgSQL_stmt_type { pub const PLPGSQL_STMT_ROLLBACK: Type = 26; pub const PLPGSQL_STMT_SET: Type = 27; } -pub mod _bindgen_ty_25 { +pub mod _bindgen_ty_26 { pub type Type = ::core::ffi::c_uint; pub const PLPGSQL_RC_OK: Type = 0; pub const PLPGSQL_RC_EXIT: Type = 1; @@ -27710,6 +27760,36 @@ impl Default for WalSndCtlData { } } } +pub type replace_rte_variables_callback = ::core::option::Option< + unsafe extern "C-unwind" fn( + var: *mut Var, + context: *mut replace_rte_variables_context, + ) -> *mut Node, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct replace_rte_variables_context { + pub callback: replace_rte_variables_callback, + pub callback_arg: *mut ::core::ffi::c_void, + pub target_varno: ::core::ffi::c_int, + pub sublevels_up: ::core::ffi::c_int, + pub inserted_sublink: bool, +} +impl Default for replace_rte_variables_context { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub mod ReplaceVarsNoMatchOption { + pub type Type = ::core::ffi::c_uint; + pub const REPLACEVARS_REPORT_ERROR: Type = 0; + pub const REPLACEVARS_CHANGE_VARNO: Type = 1; + pub const REPLACEVARS_SUBSTITUTE_NULL: Type = 2; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RowSecurityPolicy { @@ -30160,16 +30240,6 @@ unsafe extern "C-unwind" { uid: *mut uid_t, gid: *mut gid_t, ) -> ::core::ffi::c_int; - pub fn strlcat( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; - pub fn strlcpy( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; pub fn pqGetpwuid( uid: uid_t, resultbuf: *mut passwd, @@ -41555,6 +41625,74 @@ unsafe extern "C-unwind" { include_triggers: bool, include_cols: *mut Bitmapset, ) -> ::core::ffi::c_int; + pub fn OffsetVarNodes( + node: *mut Node, + offset: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn ChangeVarNodes( + node: *mut Node, + old_varno: ::core::ffi::c_int, + new_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp( + node: *mut Node, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp_rtable( + rtable: *mut List, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn rangeTableEntry_used( + node: *mut Node, + rt_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ) -> bool; + pub fn getInsertSelectQuery( + parsetree: *mut Query, + subquery_ptr: *mut *mut *mut Query, + ) -> *mut Query; + pub fn AddQual(parsetree: *mut Query, qual: *mut Node); + pub fn AddInvertedQual(parsetree: *mut Query, qual: *mut Node); + pub fn contain_aggs_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) -> bool; + pub fn locate_agg_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) + -> ::core::ffi::c_int; + pub fn contain_windowfuncs(node: *mut Node) -> bool; + pub fn locate_windowfunc(node: *mut Node) -> ::core::ffi::c_int; + pub fn checkExprHasSubLink(node: *mut Node) -> bool; + pub fn replace_rte_variables( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + callback: replace_rte_variables_callback, + callback_arg: *mut ::core::ffi::c_void, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; + pub fn replace_rte_variables_mutator( + node: *mut Node, + context: *mut replace_rte_variables_context, + ) -> *mut Node; + pub fn map_variable_attnos( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + attno_map: *const AttrMap, + to_rowtype: Oid, + found_whole_row: *mut bool, + ) -> *mut Node; + pub fn ReplaceVarsFromTargetList( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + target_rte: *mut RangeTblEntry, + targetlist: *mut List, + nomatch_option: ReplaceVarsNoMatchOption::Type, + nomatch_varno: ::core::ffi::c_int, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; pub static mut row_security_policy_hook_permissive: row_security_policy_hook_type; pub static mut row_security_policy_hook_restrictive: row_security_policy_hook_type; pub fn get_row_security_policies( diff --git a/pgrx-pg-sys/src/include/pg14.rs b/pgrx-pg-sys/src/include/pg14.rs index f1f4fe947..12b55d397 100644 --- a/pgrx-pg-sys/src/include/pg14.rs +++ b/pgrx-pg-sys/src/include/pg14.rs @@ -182,18 +182,18 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &::core::ffi::CStr = c"pgsql-bugs@lists.postgresql.org"; pub const PACKAGE_NAME: &::core::ffi::CStr = c"PostgreSQL"; -pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 14.22"; +pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 14.23"; pub const PACKAGE_TARNAME: &::core::ffi::CStr = c"postgresql"; pub const PACKAGE_URL: &::core::ffi::CStr = c"https://www.postgresql.org/"; -pub const PACKAGE_VERSION: &::core::ffi::CStr = c"14.22"; +pub const PACKAGE_VERSION: &::core::ffi::CStr = c"14.23"; pub const PG_KRB_SRVNAM: &::core::ffi::CStr = c"postgres"; pub const PG_MAJORVERSION: &::core::ffi::CStr = c"14"; pub const PG_MAJORVERSION_NUM: u32 = 14; -pub const PG_MINORVERSION_NUM: u32 = 22; +pub const PG_MINORVERSION_NUM: u32 = 23; pub const PG_USE_STDBOOL: u32 = 1; -pub const PG_VERSION: &::core::ffi::CStr = c"14.22"; -pub const PG_VERSION_NUM: u32 = 140022; -pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 14.22 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, 64-bit" ; +pub const PG_VERSION: &::core::ffi::CStr = c"14.23"; +pub const PG_VERSION_NUM: u32 = 140023; +pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 14.23 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0, 64-bit" ; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; pub const SIZEOF_LONG: u32 = 8; @@ -251,7 +251,7 @@ pub const PG_BINARY_A: &::core::ffi::CStr = c"a"; pub const PG_BINARY_R: &::core::ffi::CStr = c"r"; pub const PG_BINARY_W: &::core::ffi::CStr = c"w"; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 14.22\n"; +pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 14.23\n"; pub const EXE: &::core::ffi::CStr = c""; pub const DEVNULL: &::core::ffi::CStr = c"/dev/null"; pub const USE_REPL_SNPRINTF: u32 = 1; @@ -5734,7 +5734,8 @@ pub const RANGESTRAT_CONTAINED_BY: u32 = 8; pub const RANGESTRAT_CONTAINS_ELEM: u32 = 16; pub const RANGESTRAT_EQ: u32 = 18; pub type pg_int64 = ::core::ffi::c_long; -pub type va_list = __builtin_va_list; +pub type __gnuc_va_list = __builtin_va_list; +pub type __uint64_t = ::core::ffi::c_ulong; pub type __uid_t = ::core::ffi::c_uint; pub type __gid_t = ::core::ffi::c_uint; pub type __ino_t = ::core::ffi::c_ulong; @@ -5781,7 +5782,9 @@ pub struct _IO_FILE { pub _markers: *mut _IO_marker, pub _chain: *mut _IO_FILE, pub _fileno: ::core::ffi::c_int, - pub _flags2: ::core::ffi::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub _short_backupbuf: [::core::ffi::c_char; 1usize], pub _old_offset: __off_t, pub _cur_column: ::core::ffi::c_ushort, pub _vtable_offset: ::core::ffi::c_schar, @@ -5792,9 +5795,11 @@ pub struct _IO_FILE { pub _wide_data: *mut _IO_wide_data, pub _freeres_list: *mut _IO_FILE, pub _freeres_buf: *mut ::core::ffi::c_void, - pub __pad5: usize, + pub _prevchain: *mut *mut _IO_FILE, pub _mode: ::core::ffi::c_int, - pub _unused2: [::core::ffi::c_char; 20usize], + pub _unused3: ::core::ffi::c_int, + pub _total_written: __uint64_t, + pub _unused2: [::core::ffi::c_char; 8usize], } impl Default for _IO_FILE { fn default() -> Self { @@ -5805,6 +5810,51 @@ impl Default for _IO_FILE { } } } +impl _IO_FILE { + #[inline] + pub fn _flags2(&self) -> ::core::ffi::c_int { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set__flags2(&mut self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn _flags2_raw(this: *const Self) -> ::core::ffi::c_int { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set__flags2_raw(this: *mut Self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(_flags2: ::core::ffi::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let _flags2: u32 = unsafe { ::core::mem::transmute(_flags2) }; + _flags2 as u64 + }); + __bindgen_bitfield_unit + } +} +pub type va_list = __gnuc_va_list; pub type off_t = __off_t; pub type gid_t = __gid_t; pub type mode_t = __mode_t; @@ -16750,7 +16800,7 @@ pub mod TypeFuncClass { pub const TYPEFUNC_OTHER: Type = 4; } pub type sig_atomic_t = __sig_atomic_t; -pub mod _bindgen_ty_19 { +pub mod _bindgen_ty_20 { pub type Type = ::core::ffi::c_uint; pub const SIGEV_SIGNAL: Type = 0; pub const SIGEV_NONE: Type = 1; @@ -25650,6 +25700,8 @@ impl Default for ExprEvalStep__bindgen_ty_1__bindgen_ty_31 { #[derive(Debug, Copy, Clone)] pub struct ExprEvalStep__bindgen_ty_1__bindgen_ty_32 { pub has_nulls: bool, + pub null_lhs_result: bool, + pub null_lhs_isnull: bool, pub elements_tab: *mut ScalarArrayOpExprHashTable, pub finfo: *mut FmgrInfo, pub fcinfo_data: FunctionCallInfo, @@ -27510,7 +27562,7 @@ pub mod PLpgSQL_stmt_type { pub const PLPGSQL_STMT_COMMIT: Type = 25; pub const PLPGSQL_STMT_ROLLBACK: Type = 26; } -pub mod _bindgen_ty_25 { +pub mod _bindgen_ty_26 { pub type Type = ::core::ffi::c_uint; pub const PLPGSQL_RC_OK: Type = 0; pub const PLPGSQL_RC_EXIT: Type = 1; @@ -29746,6 +29798,36 @@ impl Default for WalSndCtlData { } } } +pub type replace_rte_variables_callback = ::core::option::Option< + unsafe extern "C-unwind" fn( + var: *mut Var, + context: *mut replace_rte_variables_context, + ) -> *mut Node, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct replace_rte_variables_context { + pub callback: replace_rte_variables_callback, + pub callback_arg: *mut ::core::ffi::c_void, + pub target_varno: ::core::ffi::c_int, + pub sublevels_up: ::core::ffi::c_int, + pub inserted_sublink: bool, +} +impl Default for replace_rte_variables_context { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub mod ReplaceVarsNoMatchOption { + pub type Type = ::core::ffi::c_uint; + pub const REPLACEVARS_REPORT_ERROR: Type = 0; + pub const REPLACEVARS_CHANGE_VARNO: Type = 1; + pub const REPLACEVARS_SUBSTITUTE_NULL: Type = 2; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RowSecurityPolicy { @@ -32059,6 +32141,7 @@ unsafe extern "C-unwind" { pub fn cleanup_path(path: *mut ::core::ffi::c_char); pub fn path_contains_parent_reference(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_relative_and_below_cwd(path: *const ::core::ffi::c_char) -> bool; + pub fn path_is_safe_for_extraction(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_prefix_of_path( path1: *const ::core::ffi::c_char, path2: *const ::core::ffi::c_char, @@ -32209,16 +32292,6 @@ unsafe extern "C-unwind" { uid: *mut uid_t, gid: *mut gid_t, ) -> ::core::ffi::c_int; - pub fn strlcat( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; - pub fn strlcpy( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; pub fn pqGetpwuid( uid: uid_t, resultbuf: *mut passwd, @@ -32234,6 +32307,11 @@ unsafe extern "C-unwind" { result: *mut *mut hostent, herrno: *mut ::core::ffi::c_int, ) -> ::core::ffi::c_int; + pub fn timingsafe_bcmp( + b1: *const ::core::ffi::c_void, + b2: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; pub fn pg_qsort( base: *mut ::core::ffi::c_void, nel: usize, @@ -32395,7 +32473,32 @@ unsafe extern "C-unwind" { pub fn palloc0(size: Size) -> *mut ::core::ffi::c_void; pub fn palloc_extended(size: Size, flags: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; pub fn repalloc(pointer: *mut ::core::ffi::c_void, size: Size) -> *mut ::core::ffi::c_void; + pub fn repalloc_extended( + pointer: *mut ::core::ffi::c_void, + size: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; pub fn pfree(pointer: *mut ::core::ffi::c_void); + pub fn add_size(s1: Size, s2: Size) -> Size; + pub fn mul_size(s1: Size, s2: Size) -> Size; + pub fn palloc_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc0_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc_mul_extended( + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul_extended( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; pub fn MemoryContextAllocHuge(context: MemoryContext, size: Size) -> *mut ::core::ffi::c_void; pub fn repalloc_huge(pointer: *mut ::core::ffi::c_void, size: Size) -> *mut ::core::ffi::c_void; @@ -35624,6 +35727,7 @@ unsafe extern "C-unwind" { pub fn GetXLogReceiptTime(rtime: *mut TimestampTz, fromStream: *mut bool); pub fn GetXLogReplayRecPtr(replayTLI: *mut TimeLineID) -> XLogRecPtr; pub fn GetXLogInsertRecPtr() -> XLogRecPtr; + pub fn GetXLogInsertEndRecPtr() -> XLogRecPtr; pub fn GetXLogWriteRecPtr() -> XLogRecPtr; pub fn GetRecoveryPauseState() -> RecoveryPauseState::Type; pub fn SetRecoveryPause(recoveryPause: bool); @@ -36929,8 +37033,6 @@ unsafe extern "C-unwind" { size: Size, foundPtr: *mut bool, ) -> *mut ::core::ffi::c_void; - pub fn add_size(s1: Size, s2: Size) -> Size; - pub fn mul_size(s1: Size, s2: Size) -> Size; pub fn RequestAddinShmemSpace(size: Size); pub fn SHMQueueInit(queue: *mut SHM_QUEUE); pub fn SHMQueueElemInit(queue: *mut SHM_QUEUE); @@ -44080,6 +44182,74 @@ unsafe extern "C-unwind" { include_triggers: bool, include_cols: *mut Bitmapset, ) -> ::core::ffi::c_int; + pub fn OffsetVarNodes( + node: *mut Node, + offset: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn ChangeVarNodes( + node: *mut Node, + old_varno: ::core::ffi::c_int, + new_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp( + node: *mut Node, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp_rtable( + rtable: *mut List, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn rangeTableEntry_used( + node: *mut Node, + rt_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ) -> bool; + pub fn getInsertSelectQuery( + parsetree: *mut Query, + subquery_ptr: *mut *mut *mut Query, + ) -> *mut Query; + pub fn AddQual(parsetree: *mut Query, qual: *mut Node); + pub fn AddInvertedQual(parsetree: *mut Query, qual: *mut Node); + pub fn contain_aggs_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) -> bool; + pub fn locate_agg_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) + -> ::core::ffi::c_int; + pub fn contain_windowfuncs(node: *mut Node) -> bool; + pub fn locate_windowfunc(node: *mut Node) -> ::core::ffi::c_int; + pub fn checkExprHasSubLink(node: *mut Node) -> bool; + pub fn replace_rte_variables( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + callback: replace_rte_variables_callback, + callback_arg: *mut ::core::ffi::c_void, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; + pub fn replace_rte_variables_mutator( + node: *mut Node, + context: *mut replace_rte_variables_context, + ) -> *mut Node; + pub fn map_variable_attnos( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + attno_map: *const AttrMap, + to_rowtype: Oid, + found_whole_row: *mut bool, + ) -> *mut Node; + pub fn ReplaceVarsFromTargetList( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + target_rte: *mut RangeTblEntry, + targetlist: *mut List, + nomatch_option: ReplaceVarsNoMatchOption::Type, + nomatch_varno: ::core::ffi::c_int, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; pub static mut row_security_policy_hook_permissive: row_security_policy_hook_type; pub static mut row_security_policy_hook_restrictive: row_security_policy_hook_type; pub fn get_row_security_policies( @@ -48057,6 +48227,7 @@ unsafe extern "C-unwind" { pub fn get_op_btree_interpretation(opno: Oid) -> *mut List; pub fn equality_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; pub fn comparison_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; + pub fn collations_agree_on_equality(coll1: Oid, coll2: Oid) -> bool; pub fn get_opfamily_proc(opfamily: Oid, lefttype: Oid, righttype: Oid, procnum: int16) -> Oid; pub fn get_attname( relid: Oid, diff --git a/pgrx-pg-sys/src/include/pg15.rs b/pgrx-pg-sys/src/include/pg15.rs index 3c279a33b..be124a038 100644 --- a/pgrx-pg-sys/src/include/pg15.rs +++ b/pgrx-pg-sys/src/include/pg15.rs @@ -183,18 +183,18 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &::core::ffi::CStr = c"pgsql-bugs@lists.postgresql.org"; pub const PACKAGE_NAME: &::core::ffi::CStr = c"PostgreSQL"; -pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 15.17"; +pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 15.18"; pub const PACKAGE_TARNAME: &::core::ffi::CStr = c"postgresql"; pub const PACKAGE_URL: &::core::ffi::CStr = c"https://www.postgresql.org/"; -pub const PACKAGE_VERSION: &::core::ffi::CStr = c"15.17"; +pub const PACKAGE_VERSION: &::core::ffi::CStr = c"15.18"; pub const PG_KRB_SRVNAM: &::core::ffi::CStr = c"postgres"; pub const PG_MAJORVERSION: &::core::ffi::CStr = c"15"; pub const PG_MAJORVERSION_NUM: u32 = 15; -pub const PG_MINORVERSION_NUM: u32 = 17; +pub const PG_MINORVERSION_NUM: u32 = 18; pub const PG_USE_STDBOOL: u32 = 1; -pub const PG_VERSION: &::core::ffi::CStr = c"15.17"; -pub const PG_VERSION_NUM: u32 = 150017; -pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 15.17 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, 64-bit" ; +pub const PG_VERSION: &::core::ffi::CStr = c"15.18"; +pub const PG_VERSION_NUM: u32 = 150018; +pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 15.18 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0, 64-bit" ; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; pub const SIZEOF_LONG: u32 = 8; @@ -253,7 +253,7 @@ pub const PG_BINARY_A: &::core::ffi::CStr = c"a"; pub const PG_BINARY_R: &::core::ffi::CStr = c"r"; pub const PG_BINARY_W: &::core::ffi::CStr = c"w"; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 15.17\n"; +pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 15.18\n"; pub const EXE: &::core::ffi::CStr = c""; pub const DEVNULL: &::core::ffi::CStr = c"/dev/null"; pub const USE_REPL_SNPRINTF: u32 = 1; @@ -5825,7 +5825,8 @@ pub const RANGESTRAT_CONTAINED_BY: u32 = 8; pub const RANGESTRAT_CONTAINS_ELEM: u32 = 16; pub const RANGESTRAT_EQ: u32 = 18; pub type pg_int64 = ::core::ffi::c_long; -pub type va_list = __builtin_va_list; +pub type __gnuc_va_list = __builtin_va_list; +pub type __uint64_t = ::core::ffi::c_ulong; pub type __uid_t = ::core::ffi::c_uint; pub type __gid_t = ::core::ffi::c_uint; pub type __ino_t = ::core::ffi::c_ulong; @@ -5872,7 +5873,9 @@ pub struct _IO_FILE { pub _markers: *mut _IO_marker, pub _chain: *mut _IO_FILE, pub _fileno: ::core::ffi::c_int, - pub _flags2: ::core::ffi::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub _short_backupbuf: [::core::ffi::c_char; 1usize], pub _old_offset: __off_t, pub _cur_column: ::core::ffi::c_ushort, pub _vtable_offset: ::core::ffi::c_schar, @@ -5883,9 +5886,11 @@ pub struct _IO_FILE { pub _wide_data: *mut _IO_wide_data, pub _freeres_list: *mut _IO_FILE, pub _freeres_buf: *mut ::core::ffi::c_void, - pub __pad5: usize, + pub _prevchain: *mut *mut _IO_FILE, pub _mode: ::core::ffi::c_int, - pub _unused2: [::core::ffi::c_char; 20usize], + pub _unused3: ::core::ffi::c_int, + pub _total_written: __uint64_t, + pub _unused2: [::core::ffi::c_char; 8usize], } impl Default for _IO_FILE { fn default() -> Self { @@ -5896,6 +5901,51 @@ impl Default for _IO_FILE { } } } +impl _IO_FILE { + #[inline] + pub fn _flags2(&self) -> ::core::ffi::c_int { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set__flags2(&mut self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn _flags2_raw(this: *const Self) -> ::core::ffi::c_int { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set__flags2_raw(this: *mut Self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(_flags2: ::core::ffi::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let _flags2: u32 = unsafe { ::core::mem::transmute(_flags2) }; + _flags2 as u64 + }); + __bindgen_bitfield_unit + } +} +pub type va_list = __gnuc_va_list; pub type off_t = __off_t; pub type gid_t = __gid_t; pub type mode_t = __mode_t; @@ -17104,7 +17154,7 @@ pub mod TypeFuncClass { pub const TYPEFUNC_OTHER: Type = 4; } pub type sig_atomic_t = __sig_atomic_t; -pub mod _bindgen_ty_13 { +pub mod _bindgen_ty_14 { pub type Type = ::core::ffi::c_uint; pub const SIGEV_SIGNAL: Type = 0; pub const SIGEV_NONE: Type = 1; @@ -25649,6 +25699,8 @@ impl Default for ExprEvalStep__bindgen_ty_1__bindgen_ty_31 { pub struct ExprEvalStep__bindgen_ty_1__bindgen_ty_32 { pub has_nulls: bool, pub inclause: bool, + pub null_lhs_result: bool, + pub null_lhs_isnull: bool, pub elements_tab: *mut ScalarArrayOpExprHashTable, pub finfo: *mut FmgrInfo, pub fcinfo_data: FunctionCallInfo, @@ -27526,7 +27578,7 @@ pub mod PLpgSQL_stmt_type { pub const PLPGSQL_STMT_COMMIT: Type = 25; pub const PLPGSQL_STMT_ROLLBACK: Type = 26; } -pub mod _bindgen_ty_25 { +pub mod _bindgen_ty_26 { pub type Type = ::core::ffi::c_uint; pub const PLPGSQL_RC_OK: Type = 0; pub const PLPGSQL_RC_EXIT: Type = 1; @@ -29873,6 +29925,36 @@ impl Default for WalSndCtlData { } } } +pub type replace_rte_variables_callback = ::core::option::Option< + unsafe extern "C-unwind" fn( + var: *mut Var, + context: *mut replace_rte_variables_context, + ) -> *mut Node, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct replace_rte_variables_context { + pub callback: replace_rte_variables_callback, + pub callback_arg: *mut ::core::ffi::c_void, + pub target_varno: ::core::ffi::c_int, + pub sublevels_up: ::core::ffi::c_int, + pub inserted_sublink: bool, +} +impl Default for replace_rte_variables_context { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub mod ReplaceVarsNoMatchOption { + pub type Type = ::core::ffi::c_uint; + pub const REPLACEVARS_REPORT_ERROR: Type = 0; + pub const REPLACEVARS_CHANGE_VARNO: Type = 1; + pub const REPLACEVARS_SUBSTITUTE_NULL: Type = 2; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RowSecurityPolicy { @@ -32195,6 +32277,7 @@ unsafe extern "C-unwind" { pub fn cleanup_path(path: *mut ::core::ffi::c_char); pub fn path_contains_parent_reference(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_relative_and_below_cwd(path: *const ::core::ffi::c_char) -> bool; + pub fn path_is_safe_for_extraction(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_prefix_of_path( path1: *const ::core::ffi::c_char, path2: *const ::core::ffi::c_char, @@ -32341,16 +32424,6 @@ unsafe extern "C-unwind" { uid: *mut uid_t, gid: *mut gid_t, ) -> ::core::ffi::c_int; - pub fn strlcat( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; - pub fn strlcpy( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; pub fn pg_get_user_name( user_id: uid_t, buffer: *mut ::core::ffi::c_char, @@ -32361,6 +32434,11 @@ unsafe extern "C-unwind" { buffer: *mut ::core::ffi::c_char, buflen: usize, ) -> bool; + pub fn timingsafe_bcmp( + b1: *const ::core::ffi::c_void, + b2: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; pub fn pg_qsort( base: *mut ::core::ffi::c_void, nel: usize, @@ -32535,7 +32613,32 @@ unsafe extern "C-unwind" { pub fn palloc0(size: Size) -> *mut ::core::ffi::c_void; pub fn palloc_extended(size: Size, flags: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; pub fn repalloc(pointer: *mut ::core::ffi::c_void, size: Size) -> *mut ::core::ffi::c_void; + pub fn repalloc_extended( + pointer: *mut ::core::ffi::c_void, + size: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; pub fn pfree(pointer: *mut ::core::ffi::c_void); + pub fn add_size(s1: Size, s2: Size) -> Size; + pub fn mul_size(s1: Size, s2: Size) -> Size; + pub fn palloc_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc0_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc_mul_extended( + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul_extended( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; pub fn MemoryContextAllocHuge(context: MemoryContext, size: Size) -> *mut ::core::ffi::c_void; pub fn repalloc_huge(pointer: *mut ::core::ffi::c_void, size: Size) -> *mut ::core::ffi::c_void; @@ -35816,6 +35919,7 @@ unsafe extern "C-unwind" { pub fn GetRecoveryState() -> RecoveryState::Type; pub fn XLogInsertAllowed() -> bool; pub fn GetXLogInsertRecPtr() -> XLogRecPtr; + pub fn GetXLogInsertEndRecPtr() -> XLogRecPtr; pub fn GetXLogWriteRecPtr() -> XLogRecPtr; pub fn GetSystemIdentifier() -> uint64; pub fn GetMockAuthenticationNonce() -> *mut ::core::ffi::c_char; @@ -37232,8 +37336,6 @@ unsafe extern "C-unwind" { size: Size, foundPtr: *mut bool, ) -> *mut ::core::ffi::c_void; - pub fn add_size(s1: Size, s2: Size) -> Size; - pub fn mul_size(s1: Size, s2: Size) -> Size; pub fn RequestAddinShmemSpace(size: Size); pub fn SHMQueueInit(queue: *mut SHM_QUEUE); pub fn SHMQueueElemInit(queue: *mut SHM_QUEUE); @@ -44646,6 +44748,74 @@ unsafe extern "C-unwind" { include_triggers: bool, include_cols: *mut Bitmapset, ) -> ::core::ffi::c_int; + pub fn OffsetVarNodes( + node: *mut Node, + offset: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn ChangeVarNodes( + node: *mut Node, + old_varno: ::core::ffi::c_int, + new_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp( + node: *mut Node, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp_rtable( + rtable: *mut List, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn rangeTableEntry_used( + node: *mut Node, + rt_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ) -> bool; + pub fn getInsertSelectQuery( + parsetree: *mut Query, + subquery_ptr: *mut *mut *mut Query, + ) -> *mut Query; + pub fn AddQual(parsetree: *mut Query, qual: *mut Node); + pub fn AddInvertedQual(parsetree: *mut Query, qual: *mut Node); + pub fn contain_aggs_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) -> bool; + pub fn locate_agg_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) + -> ::core::ffi::c_int; + pub fn contain_windowfuncs(node: *mut Node) -> bool; + pub fn locate_windowfunc(node: *mut Node) -> ::core::ffi::c_int; + pub fn checkExprHasSubLink(node: *mut Node) -> bool; + pub fn replace_rte_variables( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + callback: replace_rte_variables_callback, + callback_arg: *mut ::core::ffi::c_void, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; + pub fn replace_rte_variables_mutator( + node: *mut Node, + context: *mut replace_rte_variables_context, + ) -> *mut Node; + pub fn map_variable_attnos( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + attno_map: *const AttrMap, + to_rowtype: Oid, + found_whole_row: *mut bool, + ) -> *mut Node; + pub fn ReplaceVarsFromTargetList( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + target_rte: *mut RangeTblEntry, + targetlist: *mut List, + nomatch_option: ReplaceVarsNoMatchOption::Type, + nomatch_varno: ::core::ffi::c_int, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; pub static mut row_security_policy_hook_permissive: row_security_policy_hook_type; pub static mut row_security_policy_hook_restrictive: row_security_policy_hook_type; pub fn get_row_security_policies( @@ -48665,6 +48835,7 @@ unsafe extern "C-unwind" { pub fn get_op_btree_interpretation(opno: Oid) -> *mut List; pub fn equality_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; pub fn comparison_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; + pub fn collations_agree_on_equality(coll1: Oid, coll2: Oid) -> bool; pub fn get_opfamily_proc(opfamily: Oid, lefttype: Oid, righttype: Oid, procnum: int16) -> Oid; pub fn get_attname( relid: Oid, diff --git a/pgrx-pg-sys/src/include/pg16.rs b/pgrx-pg-sys/src/include/pg16.rs index 9f43ae703..58f84c684 100644 --- a/pgrx-pg-sys/src/include/pg16.rs +++ b/pgrx-pg-sys/src/include/pg16.rs @@ -183,18 +183,18 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &::core::ffi::CStr = c"pgsql-bugs@lists.postgresql.org"; pub const PACKAGE_NAME: &::core::ffi::CStr = c"PostgreSQL"; -pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 16.13"; +pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 16.14"; pub const PACKAGE_TARNAME: &::core::ffi::CStr = c"postgresql"; pub const PACKAGE_URL: &::core::ffi::CStr = c"https://www.postgresql.org/"; -pub const PACKAGE_VERSION: &::core::ffi::CStr = c"16.13"; +pub const PACKAGE_VERSION: &::core::ffi::CStr = c"16.14"; pub const PG_KRB_SRVNAM: &::core::ffi::CStr = c"postgres"; pub const PG_MAJORVERSION: &::core::ffi::CStr = c"16"; pub const PG_MAJORVERSION_NUM: u32 = 16; -pub const PG_MINORVERSION_NUM: u32 = 13; +pub const PG_MINORVERSION_NUM: u32 = 14; pub const PG_USE_STDBOOL: u32 = 1; -pub const PG_VERSION: &::core::ffi::CStr = c"16.13"; -pub const PG_VERSION_NUM: u32 = 160013; -pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 16.13 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, 64-bit" ; +pub const PG_VERSION: &::core::ffi::CStr = c"16.14"; +pub const PG_VERSION_NUM: u32 = 160014; +pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 16.14 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0, 64-bit" ; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; pub const SIZEOF_LONG: u32 = 8; @@ -254,7 +254,7 @@ pub const PG_BINARY_A: &::core::ffi::CStr = c"a"; pub const PG_BINARY_R: &::core::ffi::CStr = c"r"; pub const PG_BINARY_W: &::core::ffi::CStr = c"w"; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 16.13\n"; +pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 16.14\n"; pub const EXE: &::core::ffi::CStr = c""; pub const DEVNULL: &::core::ffi::CStr = c"/dev/null"; pub const USE_REPL_SNPRINTF: u32 = 1; @@ -5902,7 +5902,8 @@ pub const RANGESTRAT_CONTAINED_BY: u32 = 8; pub const RANGESTRAT_CONTAINS_ELEM: u32 = 16; pub const RANGESTRAT_EQ: u32 = 18; pub type pg_int64 = ::core::ffi::c_long; -pub type va_list = __builtin_va_list; +pub type __gnuc_va_list = __builtin_va_list; +pub type __uint64_t = ::core::ffi::c_ulong; pub type __uid_t = ::core::ffi::c_uint; pub type __gid_t = ::core::ffi::c_uint; pub type __ino_t = ::core::ffi::c_ulong; @@ -5947,7 +5948,9 @@ pub struct _IO_FILE { pub _markers: *mut _IO_marker, pub _chain: *mut _IO_FILE, pub _fileno: ::core::ffi::c_int, - pub _flags2: ::core::ffi::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub _short_backupbuf: [::core::ffi::c_char; 1usize], pub _old_offset: __off_t, pub _cur_column: ::core::ffi::c_ushort, pub _vtable_offset: ::core::ffi::c_schar, @@ -5958,9 +5961,11 @@ pub struct _IO_FILE { pub _wide_data: *mut _IO_wide_data, pub _freeres_list: *mut _IO_FILE, pub _freeres_buf: *mut ::core::ffi::c_void, - pub __pad5: usize, + pub _prevchain: *mut *mut _IO_FILE, pub _mode: ::core::ffi::c_int, - pub _unused2: [::core::ffi::c_char; 20usize], + pub _unused3: ::core::ffi::c_int, + pub _total_written: __uint64_t, + pub _unused2: [::core::ffi::c_char; 8usize], } impl Default for _IO_FILE { fn default() -> Self { @@ -5971,6 +5976,51 @@ impl Default for _IO_FILE { } } } +impl _IO_FILE { + #[inline] + pub fn _flags2(&self) -> ::core::ffi::c_int { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set__flags2(&mut self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn _flags2_raw(this: *const Self) -> ::core::ffi::c_int { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set__flags2_raw(this: *mut Self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(_flags2: ::core::ffi::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let _flags2: u32 = unsafe { ::core::mem::transmute(_flags2) }; + _flags2 as u64 + }); + __bindgen_bitfield_unit + } +} +pub type va_list = __gnuc_va_list; pub type off_t = __off_t; pub type gid_t = __gid_t; pub type mode_t = __mode_t; @@ -17590,7 +17640,7 @@ pub mod TypeFuncClass { pub const TYPEFUNC_OTHER: Type = 4; } pub type sig_atomic_t = __sig_atomic_t; -pub mod _bindgen_ty_13 { +pub mod _bindgen_ty_14 { pub type Type = ::core::ffi::c_uint; pub const SIGEV_SIGNAL: Type = 0; pub const SIGEV_NONE: Type = 1; @@ -26340,6 +26390,8 @@ impl Default for ExprEvalStep__bindgen_ty_1__bindgen_ty_31 { pub struct ExprEvalStep__bindgen_ty_1__bindgen_ty_32 { pub has_nulls: bool, pub inclause: bool, + pub null_lhs_result: bool, + pub null_lhs_isnull: bool, pub elements_tab: *mut ScalarArrayOpExprHashTable, pub finfo: *mut FmgrInfo, pub fcinfo_data: FunctionCallInfo, @@ -28344,7 +28396,7 @@ pub mod PLpgSQL_stmt_type { pub const PLPGSQL_STMT_COMMIT: Type = 25; pub const PLPGSQL_STMT_ROLLBACK: Type = 26; } -pub mod _bindgen_ty_25 { +pub mod _bindgen_ty_26 { pub type Type = ::core::ffi::c_uint; pub const PLPGSQL_RC_OK: Type = 0; pub const PLPGSQL_RC_EXIT: Type = 1; @@ -30737,6 +30789,36 @@ impl Default for WalSndCtlData { } } } +pub type replace_rte_variables_callback = ::core::option::Option< + unsafe extern "C-unwind" fn( + var: *mut Var, + context: *mut replace_rte_variables_context, + ) -> *mut Node, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct replace_rte_variables_context { + pub callback: replace_rte_variables_callback, + pub callback_arg: *mut ::core::ffi::c_void, + pub target_varno: ::core::ffi::c_int, + pub sublevels_up: ::core::ffi::c_int, + pub inserted_sublink: bool, +} +impl Default for replace_rte_variables_context { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub mod ReplaceVarsNoMatchOption { + pub type Type = ::core::ffi::c_uint; + pub const REPLACEVARS_REPORT_ERROR: Type = 0; + pub const REPLACEVARS_CHANGE_VARNO: Type = 1; + pub const REPLACEVARS_SUBSTITUTE_NULL: Type = 2; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RowSecurityPolicy { @@ -33103,6 +33185,7 @@ unsafe extern "C-unwind" { pub fn cleanup_path(path: *mut ::core::ffi::c_char); pub fn path_contains_parent_reference(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_relative_and_below_cwd(path: *const ::core::ffi::c_char) -> bool; + pub fn path_is_safe_for_extraction(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_prefix_of_path( path1: *const ::core::ffi::c_char, path2: *const ::core::ffi::c_char, @@ -33248,16 +33331,6 @@ unsafe extern "C-unwind" { uid: *mut uid_t, gid: *mut gid_t, ) -> ::core::ffi::c_int; - pub fn strlcat( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; - pub fn strlcpy( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; pub fn pg_get_user_name( user_id: uid_t, buffer: *mut ::core::ffi::c_char, @@ -33268,6 +33341,11 @@ unsafe extern "C-unwind" { buffer: *mut ::core::ffi::c_char, buflen: usize, ) -> bool; + pub fn timingsafe_bcmp( + b1: *const ::core::ffi::c_void, + b2: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; pub fn pg_qsort( base: *mut ::core::ffi::c_void, nel: usize, @@ -33500,6 +33578,26 @@ unsafe extern "C-unwind" { size: Size, ) -> *mut ::core::ffi::c_void; pub fn pfree(pointer: *mut ::core::ffi::c_void); + pub fn add_size(s1: Size, s2: Size) -> Size; + pub fn mul_size(s1: Size, s2: Size) -> Size; + pub fn palloc_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc0_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc_mul_extended( + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul_extended( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; pub fn MemoryContextAllocHuge(context: MemoryContext, size: Size) -> *mut ::core::ffi::c_void; pub fn repalloc_huge(pointer: *mut ::core::ffi::c_void, size: Size) -> *mut ::core::ffi::c_void; @@ -37037,6 +37135,7 @@ unsafe extern "C-unwind" { pub fn GetRecoveryState() -> RecoveryState::Type; pub fn XLogInsertAllowed() -> bool; pub fn GetXLogInsertRecPtr() -> XLogRecPtr; + pub fn GetXLogInsertEndRecPtr() -> XLogRecPtr; pub fn GetXLogWriteRecPtr() -> XLogRecPtr; pub fn GetSystemIdentifier() -> uint64; pub fn GetMockAuthenticationNonce() -> *mut ::core::ffi::c_char; @@ -38075,8 +38174,6 @@ unsafe extern "C-unwind" { size: Size, foundPtr: *mut bool, ) -> *mut ::core::ffi::c_void; - pub fn add_size(s1: Size, s2: Size) -> Size; - pub fn mul_size(s1: Size, s2: Size) -> Size; pub fn RequestAddinShmemSpace(size: Size); pub fn shm_toc_create( magic: uint64, @@ -46063,6 +46160,90 @@ unsafe extern "C-unwind" { include_triggers: bool, include_cols: *mut Bitmapset, ) -> ::core::ffi::c_int; + pub fn CombineRangeTables( + dst_rtable: *mut *mut List, + dst_perminfos: *mut *mut List, + src_rtable: *mut List, + src_perminfos: *mut List, + ); + pub fn OffsetVarNodes( + node: *mut Node, + offset: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn ChangeVarNodes( + node: *mut Node, + rt_index: ::core::ffi::c_int, + new_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp( + node: *mut Node, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp_rtable( + rtable: *mut List, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn rangeTableEntry_used( + node: *mut Node, + rt_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ) -> bool; + pub fn getInsertSelectQuery( + parsetree: *mut Query, + subquery_ptr: *mut *mut *mut Query, + ) -> *mut Query; + pub fn AddQual(parsetree: *mut Query, qual: *mut Node); + pub fn AddInvertedQual(parsetree: *mut Query, qual: *mut Node); + pub fn contain_aggs_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) -> bool; + pub fn locate_agg_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) + -> ::core::ffi::c_int; + pub fn contain_windowfuncs(node: *mut Node) -> bool; + pub fn locate_windowfunc(node: *mut Node) -> ::core::ffi::c_int; + pub fn checkExprHasSubLink(node: *mut Node) -> bool; + pub fn add_nulling_relids( + node: *mut Node, + target_relids: *const Bitmapset, + added_relids: *const Bitmapset, + ) -> *mut Node; + pub fn remove_nulling_relids( + node: *mut Node, + removable_relids: *const Bitmapset, + except_relids: *const Bitmapset, + ) -> *mut Node; + pub fn replace_rte_variables( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + callback: replace_rte_variables_callback, + callback_arg: *mut ::core::ffi::c_void, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; + pub fn replace_rte_variables_mutator( + node: *mut Node, + context: *mut replace_rte_variables_context, + ) -> *mut Node; + pub fn map_variable_attnos( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + attno_map: *const AttrMap, + to_rowtype: Oid, + found_whole_row: *mut bool, + ) -> *mut Node; + pub fn ReplaceVarsFromTargetList( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + target_rte: *mut RangeTblEntry, + targetlist: *mut List, + nomatch_option: ReplaceVarsNoMatchOption::Type, + nomatch_varno: ::core::ffi::c_int, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; pub static mut row_security_policy_hook_permissive: row_security_policy_hook_type; pub static mut row_security_policy_hook_restrictive: row_security_policy_hook_type; pub fn get_row_security_policies( @@ -50359,6 +50540,7 @@ unsafe extern "C-unwind" { pub fn get_op_btree_interpretation(opno: Oid) -> *mut List; pub fn equality_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; pub fn comparison_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; + pub fn collations_agree_on_equality(coll1: Oid, coll2: Oid) -> bool; pub fn get_opfamily_proc(opfamily: Oid, lefttype: Oid, righttype: Oid, procnum: int16) -> Oid; pub fn get_attname( relid: Oid, diff --git a/pgrx-pg-sys/src/include/pg17.rs b/pgrx-pg-sys/src/include/pg17.rs index b002513f5..deb74e304 100644 --- a/pgrx-pg-sys/src/include/pg17.rs +++ b/pgrx-pg-sys/src/include/pg17.rs @@ -182,18 +182,18 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &::core::ffi::CStr = c"pgsql-bugs@lists.postgresql.org"; pub const PACKAGE_NAME: &::core::ffi::CStr = c"PostgreSQL"; -pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 17.9"; +pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 17.10"; pub const PACKAGE_TARNAME: &::core::ffi::CStr = c"postgresql"; pub const PACKAGE_URL: &::core::ffi::CStr = c"https://www.postgresql.org/"; -pub const PACKAGE_VERSION: &::core::ffi::CStr = c"17.9"; +pub const PACKAGE_VERSION: &::core::ffi::CStr = c"17.10"; pub const PG_KRB_SRVNAM: &::core::ffi::CStr = c"postgres"; pub const PG_MAJORVERSION: &::core::ffi::CStr = c"17"; pub const PG_MAJORVERSION_NUM: u32 = 17; -pub const PG_MINORVERSION_NUM: u32 = 9; +pub const PG_MINORVERSION_NUM: u32 = 10; pub const PG_USE_STDBOOL: u32 = 1; -pub const PG_VERSION: &::core::ffi::CStr = c"17.9"; -pub const PG_VERSION_NUM: u32 = 170009; -pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 17.9 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, 64-bit" ; +pub const PG_VERSION: &::core::ffi::CStr = c"17.10"; +pub const PG_VERSION_NUM: u32 = 170010; +pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 17.10 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0, 64-bit" ; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; pub const SIZEOF_LONG: u32 = 8; @@ -254,7 +254,7 @@ pub const PG_BINARY_A: &::core::ffi::CStr = c"a"; pub const PG_BINARY_R: &::core::ffi::CStr = c"r"; pub const PG_BINARY_W: &::core::ffi::CStr = c"w"; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 17.9\n"; +pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 17.10\n"; pub const EXE: &::core::ffi::CStr = c""; pub const DEVNULL: &::core::ffi::CStr = c"/dev/null"; pub const USE_REPL_SNPRINTF: u32 = 1; @@ -6021,7 +6021,8 @@ pub const RANGESTRAT_CONTAINED_BY: u32 = 8; pub const RANGESTRAT_CONTAINS_ELEM: u32 = 16; pub const RANGESTRAT_EQ: u32 = 18; pub type pg_int64 = ::core::ffi::c_long; -pub type va_list = __builtin_va_list; +pub type __gnuc_va_list = __builtin_va_list; +pub type __uint64_t = ::core::ffi::c_ulong; pub type __uid_t = ::core::ffi::c_uint; pub type __gid_t = ::core::ffi::c_uint; pub type __ino_t = ::core::ffi::c_ulong; @@ -6066,7 +6067,9 @@ pub struct _IO_FILE { pub _markers: *mut _IO_marker, pub _chain: *mut _IO_FILE, pub _fileno: ::core::ffi::c_int, - pub _flags2: ::core::ffi::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub _short_backupbuf: [::core::ffi::c_char; 1usize], pub _old_offset: __off_t, pub _cur_column: ::core::ffi::c_ushort, pub _vtable_offset: ::core::ffi::c_schar, @@ -6077,9 +6080,11 @@ pub struct _IO_FILE { pub _wide_data: *mut _IO_wide_data, pub _freeres_list: *mut _IO_FILE, pub _freeres_buf: *mut ::core::ffi::c_void, - pub __pad5: usize, + pub _prevchain: *mut *mut _IO_FILE, pub _mode: ::core::ffi::c_int, - pub _unused2: [::core::ffi::c_char; 20usize], + pub _unused3: ::core::ffi::c_int, + pub _total_written: __uint64_t, + pub _unused2: [::core::ffi::c_char; 8usize], } impl Default for _IO_FILE { fn default() -> Self { @@ -6090,6 +6095,51 @@ impl Default for _IO_FILE { } } } +impl _IO_FILE { + #[inline] + pub fn _flags2(&self) -> ::core::ffi::c_int { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set__flags2(&mut self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn _flags2_raw(this: *const Self) -> ::core::ffi::c_int { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set__flags2_raw(this: *mut Self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(_flags2: ::core::ffi::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let _flags2: u32 = unsafe { ::core::mem::transmute(_flags2) }; + _flags2 as u64 + }); + __bindgen_bitfield_unit + } +} +pub type va_list = __gnuc_va_list; pub type off_t = __off_t; pub type gid_t = __gid_t; pub type mode_t = __mode_t; @@ -18675,7 +18725,7 @@ pub mod TypeFuncClass { pub const TYPEFUNC_OTHER: Type = 4; } pub type sig_atomic_t = __sig_atomic_t; -pub mod _bindgen_ty_16 { +pub mod _bindgen_ty_17 { pub type Type = ::core::ffi::c_uint; pub const SIGEV_SIGNAL: Type = 0; pub const SIGEV_NONE: Type = 1; @@ -27281,6 +27331,8 @@ impl Default for ExprEvalStep__bindgen_ty_1__bindgen_ty_31 { pub struct ExprEvalStep__bindgen_ty_1__bindgen_ty_32 { pub has_nulls: bool, pub inclause: bool, + pub null_lhs_result: bool, + pub null_lhs_isnull: bool, pub elements_tab: *mut ScalarArrayOpExprHashTable, pub finfo: *mut FmgrInfo, pub fcinfo_data: FunctionCallInfo, @@ -29223,7 +29275,7 @@ pub mod PLpgSQL_stmt_type { pub const PLPGSQL_STMT_COMMIT: Type = 25; pub const PLPGSQL_STMT_ROLLBACK: Type = 26; } -pub mod _bindgen_ty_25 { +pub mod _bindgen_ty_26 { pub type Type = ::core::ffi::c_uint; pub const PLPGSQL_RC_OK: Type = 0; pub const PLPGSQL_RC_EXIT: Type = 1; @@ -31626,6 +31678,36 @@ impl Default for WalSndCtlData { } } } +pub type replace_rte_variables_callback = ::core::option::Option< + unsafe extern "C-unwind" fn( + var: *mut Var, + context: *mut replace_rte_variables_context, + ) -> *mut Node, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct replace_rte_variables_context { + pub callback: replace_rte_variables_callback, + pub callback_arg: *mut ::core::ffi::c_void, + pub target_varno: ::core::ffi::c_int, + pub sublevels_up: ::core::ffi::c_int, + pub inserted_sublink: bool, +} +impl Default for replace_rte_variables_context { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub mod ReplaceVarsNoMatchOption { + pub type Type = ::core::ffi::c_uint; + pub const REPLACEVARS_REPORT_ERROR: Type = 0; + pub const REPLACEVARS_CHANGE_VARNO: Type = 1; + pub const REPLACEVARS_SUBSTITUTE_NULL: Type = 2; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RowSecurityPolicy { @@ -31896,7 +31978,8 @@ pub mod ProcSignalReason { pub const PROCSIG_RECOVERY_CONFLICT_BUFFERPIN: Type = 12; pub const PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK: Type = 13; pub const PROCSIG_RECOVERY_CONFLICT_LAST: Type = 13; - pub const NUM_PROCSIGNALS: Type = 14; + pub const PROCSIG_SLOTSYNC_MESSAGE: Type = 14; + pub const NUM_PROCSIGNALS: Type = 15; } pub mod ProcSignalBarrierType { pub type Type = ::core::ffi::c_uint; @@ -33990,6 +34073,7 @@ unsafe extern "C-unwind" { pub fn cleanup_path(path: *mut ::core::ffi::c_char); pub fn path_contains_parent_reference(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_relative_and_below_cwd(path: *const ::core::ffi::c_char) -> bool; + pub fn path_is_safe_for_extraction(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_prefix_of_path( path1: *const ::core::ffi::c_char, path2: *const ::core::ffi::c_char, @@ -34131,16 +34215,6 @@ unsafe extern "C-unwind" { uid: *mut uid_t, gid: *mut gid_t, ) -> ::core::ffi::c_int; - pub fn strlcat( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; - pub fn strlcpy( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; pub fn pg_get_user_name( user_id: uid_t, buffer: *mut ::core::ffi::c_char, @@ -34151,6 +34225,11 @@ unsafe extern "C-unwind" { buffer: *mut ::core::ffi::c_char, buflen: usize, ) -> bool; + pub fn timingsafe_bcmp( + b1: *const ::core::ffi::c_void, + b2: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; pub fn pg_qsort( base: *mut ::core::ffi::c_void, nel: usize, @@ -34391,6 +34470,26 @@ unsafe extern "C-unwind" { size: Size, ) -> *mut ::core::ffi::c_void; pub fn pfree(pointer: *mut ::core::ffi::c_void); + pub fn add_size(s1: Size, s2: Size) -> Size; + pub fn mul_size(s1: Size, s2: Size) -> Size; + pub fn palloc_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc0_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc_mul_extended( + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul_extended( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; pub fn MemoryContextAllocHuge(context: MemoryContext, size: Size) -> *mut ::core::ffi::c_void; pub fn repalloc_huge(pointer: *mut ::core::ffi::c_void, size: Size) -> *mut ::core::ffi::c_void; @@ -38174,6 +38273,7 @@ unsafe extern "C-unwind" { pub fn GetRecoveryState() -> RecoveryState::Type; pub fn XLogInsertAllowed() -> bool; pub fn GetXLogInsertRecPtr() -> XLogRecPtr; + pub fn GetXLogInsertEndRecPtr() -> XLogRecPtr; pub fn GetXLogWriteRecPtr() -> XLogRecPtr; pub fn GetSystemIdentifier() -> uint64; pub fn GetMockAuthenticationNonce() -> *mut ::core::ffi::c_char; @@ -39417,8 +39517,6 @@ unsafe extern "C-unwind" { size: Size, foundPtr: *mut bool, ) -> *mut ::core::ffi::c_void; - pub fn add_size(s1: Size, s2: Size) -> Size; - pub fn mul_size(s1: Size, s2: Size) -> Size; pub fn RequestAddinShmemSpace(size: Size); pub fn shm_toc_create( magic: uint64, @@ -40178,6 +40276,7 @@ unsafe extern "C-unwind" { all_frozen: *mut BlockNumber, ); pub fn visibilitymap_prepare_truncate(rel: Relation, nheapblocks: BlockNumber) -> BlockNumber; + pub fn visibilitymap_truncation_length(nheapblocks: BlockNumber) -> BlockNumber; #[link_name = "XLogFileName__pgrx_cshim"] pub fn XLogFileName( fname: *mut ::core::ffi::c_char, @@ -47490,6 +47589,90 @@ unsafe extern "C-unwind" { mergeActionList: *mut List, detail: *const ::core::ffi::c_char, ); + pub fn CombineRangeTables( + dst_rtable: *mut *mut List, + dst_perminfos: *mut *mut List, + src_rtable: *mut List, + src_perminfos: *mut List, + ); + pub fn OffsetVarNodes( + node: *mut Node, + offset: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn ChangeVarNodes( + node: *mut Node, + rt_index: ::core::ffi::c_int, + new_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp( + node: *mut Node, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp_rtable( + rtable: *mut List, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn rangeTableEntry_used( + node: *mut Node, + rt_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ) -> bool; + pub fn getInsertSelectQuery( + parsetree: *mut Query, + subquery_ptr: *mut *mut *mut Query, + ) -> *mut Query; + pub fn AddQual(parsetree: *mut Query, qual: *mut Node); + pub fn AddInvertedQual(parsetree: *mut Query, qual: *mut Node); + pub fn contain_aggs_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) -> bool; + pub fn locate_agg_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) + -> ::core::ffi::c_int; + pub fn contain_windowfuncs(node: *mut Node) -> bool; + pub fn locate_windowfunc(node: *mut Node) -> ::core::ffi::c_int; + pub fn checkExprHasSubLink(node: *mut Node) -> bool; + pub fn add_nulling_relids( + node: *mut Node, + target_relids: *const Bitmapset, + added_relids: *const Bitmapset, + ) -> *mut Node; + pub fn remove_nulling_relids( + node: *mut Node, + removable_relids: *const Bitmapset, + except_relids: *const Bitmapset, + ) -> *mut Node; + pub fn replace_rte_variables( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + callback: replace_rte_variables_callback, + callback_arg: *mut ::core::ffi::c_void, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; + pub fn replace_rte_variables_mutator( + node: *mut Node, + context: *mut replace_rte_variables_context, + ) -> *mut Node; + pub fn map_variable_attnos( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + attno_map: *const AttrMap, + to_rowtype: Oid, + found_whole_row: *mut bool, + ) -> *mut Node; + pub fn ReplaceVarsFromTargetList( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + target_rte: *mut RangeTblEntry, + targetlist: *mut List, + nomatch_option: ReplaceVarsNoMatchOption::Type, + nomatch_varno: ::core::ffi::c_int, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; pub static mut row_security_policy_hook_permissive: row_security_policy_hook_type; pub static mut row_security_policy_hook_restrictive: row_security_policy_hook_type; pub fn get_row_security_policies( @@ -51885,6 +52068,7 @@ unsafe extern "C-unwind" { pub fn get_op_btree_interpretation(opno: Oid) -> *mut List; pub fn equality_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; pub fn comparison_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; + pub fn collations_agree_on_equality(coll1: Oid, coll2: Oid) -> bool; pub fn get_opfamily_proc(opfamily: Oid, lefttype: Oid, righttype: Oid, procnum: int16) -> Oid; pub fn get_attname( relid: Oid, diff --git a/pgrx-pg-sys/src/include/pg18.rs b/pgrx-pg-sys/src/include/pg18.rs index ac2f58429..ebd5086e5 100644 --- a/pgrx-pg-sys/src/include/pg18.rs +++ b/pgrx-pg-sys/src/include/pg18.rs @@ -164,17 +164,17 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &::core::ffi::CStr = c"pgsql-bugs@lists.postgresql.org"; pub const PACKAGE_NAME: &::core::ffi::CStr = c"PostgreSQL"; -pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 18.3"; +pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 18.4"; pub const PACKAGE_TARNAME: &::core::ffi::CStr = c"postgresql"; pub const PACKAGE_URL: &::core::ffi::CStr = c"https://www.postgresql.org/"; -pub const PACKAGE_VERSION: &::core::ffi::CStr = c"18.3"; +pub const PACKAGE_VERSION: &::core::ffi::CStr = c"18.4"; pub const PG_KRB_SRVNAM: &::core::ffi::CStr = c"postgres"; pub const PG_MAJORVERSION: &::core::ffi::CStr = c"18"; pub const PG_MAJORVERSION_NUM: u32 = 18; -pub const PG_MINORVERSION_NUM: u32 = 3; -pub const PG_VERSION: &::core::ffi::CStr = c"18.3"; -pub const PG_VERSION_NUM: u32 = 180003; -pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 18.3 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, 64-bit" ; +pub const PG_MINORVERSION_NUM: u32 = 4; +pub const PG_VERSION: &::core::ffi::CStr = c"18.4"; +pub const PG_VERSION_NUM: u32 = 180004; +pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 18.4 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0, 64-bit" ; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_LONG: u32 = 8; pub const SIZEOF_LONG_LONG: u32 = 8; @@ -251,7 +251,7 @@ pub const PG_BINARY_A: &::core::ffi::CStr = c"a"; pub const PG_BINARY_R: &::core::ffi::CStr = c"r"; pub const PG_BINARY_W: &::core::ffi::CStr = c"w"; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 18.3\n"; +pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 18.4\n"; pub const EXE: &::core::ffi::CStr = c""; pub const DEVNULL: &::core::ffi::CStr = c"/dev/null"; pub const USE_REPL_SNPRINTF: u32 = 1; @@ -6224,6 +6224,7 @@ pub const RANGESTRAT_CONTAINS: u32 = 7; pub const RANGESTRAT_CONTAINED_BY: u32 = 8; pub const RANGESTRAT_CONTAINS_ELEM: u32 = 16; pub const RANGESTRAT_EQ: u32 = 18; +pub type __uint64_t = ::core::ffi::c_ulong; pub type __uid_t = ::core::ffi::c_uint; pub type __gid_t = ::core::ffi::c_uint; pub type __ino_t = ::core::ffi::c_ulong; @@ -6233,7 +6234,7 @@ pub type __off64_t = ::core::ffi::c_long; pub type __pid_t = ::core::ffi::c_int; pub type __socklen_t = ::core::ffi::c_uint; pub type __sig_atomic_t = ::core::ffi::c_int; -pub type va_list = __builtin_va_list; +pub type __gnuc_va_list = __builtin_va_list; pub type FILE = _IO_FILE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -6269,7 +6270,9 @@ pub struct _IO_FILE { pub _markers: *mut _IO_marker, pub _chain: *mut _IO_FILE, pub _fileno: ::core::ffi::c_int, - pub _flags2: ::core::ffi::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub _short_backupbuf: [::core::ffi::c_char; 1usize], pub _old_offset: __off_t, pub _cur_column: ::core::ffi::c_ushort, pub _vtable_offset: ::core::ffi::c_schar, @@ -6280,9 +6283,11 @@ pub struct _IO_FILE { pub _wide_data: *mut _IO_wide_data, pub _freeres_list: *mut _IO_FILE, pub _freeres_buf: *mut ::core::ffi::c_void, - pub __pad5: usize, + pub _prevchain: *mut *mut _IO_FILE, pub _mode: ::core::ffi::c_int, - pub _unused2: [::core::ffi::c_char; 20usize], + pub _unused3: ::core::ffi::c_int, + pub _total_written: __uint64_t, + pub _unused2: [::core::ffi::c_char; 8usize], } impl Default for _IO_FILE { fn default() -> Self { @@ -6293,6 +6298,51 @@ impl Default for _IO_FILE { } } } +impl _IO_FILE { + #[inline] + pub fn _flags2(&self) -> ::core::ffi::c_int { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set__flags2(&mut self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn _flags2_raw(this: *const Self) -> ::core::ffi::c_int { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set__flags2_raw(this: *mut Self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(_flags2: ::core::ffi::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let _flags2: u32 = unsafe { ::core::mem::transmute(_flags2) }; + _flags2 as u64 + }); + __bindgen_bitfield_unit + } +} +pub type va_list = __gnuc_va_list; pub type off_t = __off_t; pub type gid_t = __gid_t; pub type mode_t = __mode_t; @@ -19200,7 +19250,7 @@ pub mod TypeFuncClass { pub const TYPEFUNC_OTHER: Type = 4; } pub type sig_atomic_t = __sig_atomic_t; -pub mod _bindgen_ty_16 { +pub mod _bindgen_ty_17 { pub type Type = ::core::ffi::c_uint; pub const SIGEV_SIGNAL: Type = 0; pub const SIGEV_NONE: Type = 1; @@ -28651,6 +28701,8 @@ impl Default for ExprEvalStep__bindgen_ty_1__bindgen_ty_34 { pub struct ExprEvalStep__bindgen_ty_1__bindgen_ty_35 { pub has_nulls: bool, pub inclause: bool, + pub null_lhs_result: bool, + pub null_lhs_isnull: bool, pub elements_tab: *mut ScalarArrayOpExprHashTable, pub finfo: *mut FmgrInfo, pub fcinfo_data: FunctionCallInfo, @@ -30665,7 +30717,7 @@ pub mod PLpgSQL_stmt_type { pub const PLPGSQL_STMT_COMMIT: Type = 25; pub const PLPGSQL_STMT_ROLLBACK: Type = 26; } -pub mod _bindgen_ty_25 { +pub mod _bindgen_ty_26 { pub type Type = ::core::ffi::c_uint; pub const PLPGSQL_RC_OK: Type = 0; pub const PLPGSQL_RC_EXIT: Type = 1; @@ -33091,6 +33143,47 @@ impl Default for WalSndCtlData { } } } +pub type replace_rte_variables_callback = ::core::option::Option< + unsafe extern "C-unwind" fn( + var: *mut Var, + context: *mut replace_rte_variables_context, + ) -> *mut Node, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct replace_rte_variables_context { + pub callback: replace_rte_variables_callback, + pub callback_arg: *mut ::core::ffi::c_void, + pub target_varno: ::core::ffi::c_int, + pub sublevels_up: ::core::ffi::c_int, + pub inserted_sublink: bool, +} +impl Default for replace_rte_variables_context { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub mod ReplaceVarsNoMatchOption { + pub type Type = ::core::ffi::c_uint; + pub const REPLACEVARS_REPORT_ERROR: Type = 0; + pub const REPLACEVARS_CHANGE_VARNO: Type = 1; + pub const REPLACEVARS_SUBSTITUTE_NULL: Type = 2; +} +pub type ChangeVarNodes_callback = ::core::option::Option< + unsafe extern "C-unwind" fn(node: *mut Node, arg: *mut ChangeVarNodes_context) -> bool, +>; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct ChangeVarNodes_context { + pub rt_index: ::core::ffi::c_int, + pub new_index: ::core::ffi::c_int, + pub sublevels_up: ::core::ffi::c_int, + pub callback: ChangeVarNodes_callback, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RowSecurityPolicy { @@ -33269,6 +33362,7 @@ pub mod ProcSignalReason { pub const PROCSIG_RECOVERY_CONFLICT_BUFFERPIN: Type = 12; pub const PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK: Type = 13; pub const PROCSIG_RECOVERY_CONFLICT_LAST: Type = 13; + pub const PROCSIG_SLOTSYNC_MESSAGE: Type = 14; } pub mod ProcSignalBarrierType { pub type Type = ::core::ffi::c_uint; @@ -35381,6 +35475,7 @@ unsafe extern "C-unwind" { pub fn cleanup_path(path: *mut ::core::ffi::c_char); pub fn path_contains_parent_reference(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_relative_and_below_cwd(path: *const ::core::ffi::c_char) -> bool; + pub fn path_is_safe_for_extraction(path: *const ::core::ffi::c_char) -> bool; pub fn path_is_prefix_of_path( path1: *const ::core::ffi::c_char, path2: *const ::core::ffi::c_char, @@ -35522,16 +35617,6 @@ unsafe extern "C-unwind" { uid: *mut uid_t, gid: *mut gid_t, ) -> ::core::ffi::c_int; - pub fn strlcat( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; - pub fn strlcpy( - dst: *mut ::core::ffi::c_char, - src: *const ::core::ffi::c_char, - siz: usize, - ) -> usize; pub fn timingsafe_bcmp( b1: *const ::core::ffi::c_void, b2: *const ::core::ffi::c_void, @@ -35785,6 +35870,26 @@ unsafe extern "C-unwind" { size: Size, ) -> *mut ::core::ffi::c_void; pub fn pfree(pointer: *mut ::core::ffi::c_void); + pub fn add_size(s1: Size, s2: Size) -> Size; + pub fn mul_size(s1: Size, s2: Size) -> Size; + pub fn palloc_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc0_mul(s1: Size, s2: Size) -> *mut ::core::ffi::c_void; + pub fn palloc_mul_extended( + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + ) -> *mut ::core::ffi::c_void; + pub fn repalloc_mul_extended( + p: *mut ::core::ffi::c_void, + s1: Size, + s2: Size, + flags: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; pub fn MemoryContextAllocHuge(context: MemoryContext, size: Size) -> *mut ::core::ffi::c_void; pub fn repalloc_huge(pointer: *mut ::core::ffi::c_void, size: Size) -> *mut ::core::ffi::c_void; @@ -40010,6 +40115,7 @@ unsafe extern "C-unwind" { pub fn GetRecoveryState() -> RecoveryState::Type; pub fn XLogInsertAllowed() -> bool; pub fn GetXLogInsertRecPtr() -> XLogRecPtr; + pub fn GetXLogInsertEndRecPtr() -> XLogRecPtr; pub fn GetXLogWriteRecPtr() -> XLogRecPtr; pub fn GetSystemIdentifier() -> uint64; pub fn GetMockAuthenticationNonce() -> *mut ::core::ffi::c_char; @@ -40490,8 +40596,6 @@ unsafe extern "C-unwind" { size: Size, foundPtr: *mut bool, ) -> *mut ::core::ffi::c_void; - pub fn add_size(s1: Size, s2: Size) -> Size; - pub fn mul_size(s1: Size, s2: Size) -> Size; pub fn pg_get_shmem_pagesize() -> Size; pub fn RequestAddinShmemSpace(size: Size); pub fn shm_toc_create( @@ -42031,6 +42135,7 @@ unsafe extern "C-unwind" { all_frozen: *mut BlockNumber, ); pub fn visibilitymap_prepare_truncate(rel: Relation, nheapblocks: BlockNumber) -> BlockNumber; + pub fn visibilitymap_truncation_length(nheapblocks: BlockNumber) -> BlockNumber; #[link_name = "XLogFileName__pgrx_cshim"] pub fn XLogFileName( fname: *mut ::core::ffi::c_char, @@ -49648,6 +49753,115 @@ unsafe extern "C-unwind" { rt_index: ::core::ffi::c_int, ) -> *mut Node; pub fn build_generation_expression(rel: Relation, attrno: ::core::ffi::c_int) -> *mut Node; + pub fn adjust_relid_set( + relids: Relids, + oldrelid: ::core::ffi::c_int, + newrelid: ::core::ffi::c_int, + ) -> Relids; + pub fn CombineRangeTables( + dst_rtable: *mut *mut List, + dst_perminfos: *mut *mut List, + src_rtable: *mut List, + src_perminfos: *mut List, + ); + pub fn OffsetVarNodes( + node: *mut Node, + offset: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn ChangeVarNodes( + node: *mut Node, + rt_index: ::core::ffi::c_int, + new_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ); + pub fn ChangeVarNodesExtended( + node: *mut Node, + rt_index: ::core::ffi::c_int, + new_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + callback: ChangeVarNodes_callback, + ); + pub fn ChangeVarNodesWalkExpression( + node: *mut Node, + context: *mut ChangeVarNodes_context, + ) -> bool; + pub fn IncrementVarSublevelsUp( + node: *mut Node, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn IncrementVarSublevelsUp_rtable( + rtable: *mut List, + delta_sublevels_up: ::core::ffi::c_int, + min_sublevels_up: ::core::ffi::c_int, + ); + pub fn rangeTableEntry_used( + node: *mut Node, + rt_index: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + ) -> bool; + pub fn getInsertSelectQuery( + parsetree: *mut Query, + subquery_ptr: *mut *mut *mut Query, + ) -> *mut Query; + pub fn AddQual(parsetree: *mut Query, qual: *mut Node); + pub fn AddInvertedQual(parsetree: *mut Query, qual: *mut Node); + pub fn contain_aggs_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) -> bool; + pub fn locate_agg_of_level(node: *mut Node, levelsup: ::core::ffi::c_int) + -> ::core::ffi::c_int; + pub fn contain_windowfuncs(node: *mut Node) -> bool; + pub fn locate_windowfunc(node: *mut Node) -> ::core::ffi::c_int; + pub fn checkExprHasSubLink(node: *mut Node) -> bool; + pub fn add_nulling_relids( + node: *mut Node, + target_relids: *const Bitmapset, + added_relids: *const Bitmapset, + ) -> *mut Node; + pub fn remove_nulling_relids( + node: *mut Node, + removable_relids: *const Bitmapset, + except_relids: *const Bitmapset, + ) -> *mut Node; + pub fn replace_rte_variables( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + callback: replace_rte_variables_callback, + callback_arg: *mut ::core::ffi::c_void, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; + pub fn replace_rte_variables_mutator( + node: *mut Node, + context: *mut replace_rte_variables_context, + ) -> *mut Node; + pub fn map_variable_attnos( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + attno_map: *const AttrMap, + to_rowtype: Oid, + found_whole_row: *mut bool, + ) -> *mut Node; + pub fn ReplaceVarFromTargetList( + var: *mut Var, + target_rte: *mut RangeTblEntry, + targetlist: *mut List, + result_relation: ::core::ffi::c_int, + nomatch_option: ReplaceVarsNoMatchOption::Type, + nomatch_varno: ::core::ffi::c_int, + ) -> *mut Node; + pub fn ReplaceVarsFromTargetList( + node: *mut Node, + target_varno: ::core::ffi::c_int, + sublevels_up: ::core::ffi::c_int, + target_rte: *mut RangeTblEntry, + targetlist: *mut List, + result_relation: ::core::ffi::c_int, + nomatch_option: ReplaceVarsNoMatchOption::Type, + nomatch_varno: ::core::ffi::c_int, + outer_hasSubLinks: *mut bool, + ) -> *mut Node; pub static mut row_security_policy_hook_permissive: row_security_policy_hook_type; pub static mut row_security_policy_hook_restrictive: row_security_policy_hook_type; pub fn get_row_security_policies( @@ -54111,6 +54325,7 @@ unsafe extern "C-unwind" { pub fn get_op_index_interpretation(opno: Oid) -> *mut List; pub fn equality_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; pub fn comparison_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; + pub fn collations_agree_on_equality(coll1: Oid, coll2: Oid) -> bool; pub fn get_opfamily_proc(opfamily: Oid, lefttype: Oid, righttype: Oid, procnum: int16) -> Oid; pub fn get_attname( relid: Oid, diff --git a/pgrx-sql-entity-graph/Cargo.toml b/pgrx-sql-entity-graph/Cargo.toml index 93116f8a6..abdca7205 100644 --- a/pgrx-sql-entity-graph/Cargo.toml +++ b/pgrx-sql-entity-graph/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-sql-entity-graph" -version = "0.18.0" +version = "0.18.1" authors.workspace = true license.workspace = true description = "Sql Entity Graph for `pgrx`" diff --git a/pgrx-tests/Cargo.toml b/pgrx-tests/Cargo.toml index 90cc14f85..d8ead42d8 100644 --- a/pgrx-tests/Cargo.toml +++ b/pgrx-tests/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-tests" -version = "0.18.0" +version = "0.18.1" authors.workspace = true license.workspace = true description = "Test framework for 'pgrx'-based Postgres extensions" @@ -67,7 +67,7 @@ rand = "0.10.1" [dependencies.pgrx] # Not unified in workspace due to default-features key path = "../pgrx" default-features = false -version = "=0.18.0" +version = "=0.18.1" [target.'cfg(target_os = "windows")'.dependencies] winapi = { version = "0.3.9", features = [ diff --git a/pgrx-tests/src/framework.rs b/pgrx-tests/src/framework.rs index bdee114b7..ae66233ed 100644 --- a/pgrx-tests/src/framework.rs +++ b/pgrx-tests/src/framework.rs @@ -1260,7 +1260,7 @@ pub mod pipe { impl WindowsNamedPipe { pub fn create() -> std::io::Result { let filename: String = - rand::thread_rng().sample_iter(Alphanumeric).map(char::from).take(6).collect(); + rand::rng().sample_iter(Alphanumeric).map(char::from).take(6).collect(); let path = format!(r"\\.\pipe\{filename}"); let server = unsafe { use std::os::windows::ffi::OsStrExt; diff --git a/pgrx-unit-tests/Cargo.toml b/pgrx-unit-tests/Cargo.toml index c717d3212..c2e7b57b6 100644 --- a/pgrx-unit-tests/Cargo.toml +++ b/pgrx-unit-tests/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-unit-tests" -version = "0.18.0" +version = "0.18.1" authors.workspace = true license.workspace = true description = "Internal pgrx test extension" @@ -58,11 +58,11 @@ rand = "0.10.1" [dependencies.pgrx] path = "../pgrx" default-features = false -version = "=0.18.0" +version = "=0.18.1" [dependencies.pgrx-tests] path = "../pgrx-tests" -version = "=0.18.0" +version = "=0.18.1" [dev-dependencies] trybuild = "1" diff --git a/pgrx/Cargo.toml b/pgrx/Cargo.toml index c45a4d56b..f72de224a 100644 --- a/pgrx/Cargo.toml +++ b/pgrx/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx" -version = "0.18.0" +version = "0.18.1" authors.workspace = true license.workspace = true description = "pgrx: A Rust framework for creating Postgres extensions"