diff --git a/Cargo.lock b/Cargo.lock index 50b0d18f3..e60fde5dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -317,7 +317,7 @@ dependencies = [ [[package]] name = "cargo-pgrx" -version = "0.12.8" +version = "0.12.9" dependencies = [ "bzip2", "cargo-edit", @@ -1487,7 +1487,7 @@ dependencies = [ [[package]] name = "pgrx" -version = "0.12.8" +version = "0.12.9" dependencies = [ "atomic-traits", "bitflags 2.4.2", @@ -1509,7 +1509,7 @@ dependencies = [ [[package]] name = "pgrx-bindgen" -version = "0.12.8" +version = "0.12.9" dependencies = [ "bindgen", "cc", @@ -1525,7 +1525,7 @@ dependencies = [ [[package]] name = "pgrx-macros" -version = "0.12.8" +version = "0.12.9" dependencies = [ "pgrx-sql-entity-graph", "proc-macro2", @@ -1536,7 +1536,7 @@ dependencies = [ [[package]] name = "pgrx-pg-config" -version = "0.12.8" +version = "0.12.9" dependencies = [ "cargo_toml", "eyre", @@ -1552,7 +1552,7 @@ dependencies = [ [[package]] name = "pgrx-pg-sys" -version = "0.12.8" +version = "0.12.9" dependencies = [ "cee-scape", "libc", @@ -1565,7 +1565,7 @@ dependencies = [ [[package]] name = "pgrx-sql-entity-graph" -version = "0.12.8" +version = "0.12.9" dependencies = [ "convert_case", "eyre", @@ -1581,7 +1581,7 @@ dependencies = [ [[package]] name = "pgrx-tests" -version = "0.12.8" +version = "0.12.9" dependencies = [ "clap-cargo 0.14.0", "eyre", diff --git a/Cargo.toml b/Cargo.toml index 5704b6b4e..c196d626c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,11 +55,11 @@ exclude = [ cargo-pgrx = { path = "cargo-pgrx" } [workspace.dependencies] -pgrx-macros = { path = "./pgrx-macros", version = "=0.12.8" } -pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.12.8" } -pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.12.8" } -pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.12.8" } -pgrx-bindgen = { path = "./pgrx-bindgen", version = "0.12.8" } +pgrx-macros = { path = "./pgrx-macros", version = "=0.12.9" } +pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.12.9" } +pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.12.9" } +pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.12.9" } +pgrx-bindgen = { path = "./pgrx-bindgen", version = "0.12.9" } cargo_metadata = "0.18.0" cargo-edit = "0.12.2" # format-preserving edits to cargo.toml diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index 297651657..2ec022372 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "cargo-pgrx" -version = "0.12.8" +version = "0.12.9" authors = ["PgCentral Foundation, Inc. "] license = "MIT" 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 95135e984..2d8b8a47e 100644 --- a/cargo-pgrx/src/templates/cargo_toml +++ b/cargo-pgrx/src/templates/cargo_toml @@ -21,10 +21,10 @@ pg17 = ["pgrx/pg17", "pgrx-tests/pg17" ] pg_test = [] [dependencies] -pgrx = "=0.12.8" +pgrx = "=0.12.9" [dev-dependencies] -pgrx-tests = "=0.12.8" +pgrx-tests = "=0.12.9" [profile.dev] panic = "unwind" diff --git a/pgrx-bindgen/Cargo.toml b/pgrx-bindgen/Cargo.toml index ac04d7539..98cd82dfd 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.12.8" +version = "0.12.9" edition = "2021" license = "MIT" homepage = "https://github.com/pgcentralfoundation/pgrx" diff --git a/pgrx-macros/Cargo.toml b/pgrx-macros/Cargo.toml index 402b84cb5..3f09fe028 100644 --- a/pgrx-macros/Cargo.toml +++ b/pgrx-macros/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-macros" -version = "0.12.8" +version = "0.12.9" authors = ["PgCentral Foundation, Inc. "] license = "MIT" description = "Proc Macros for 'pgrx'" diff --git a/pgrx-pg-config/Cargo.toml b/pgrx-pg-config/Cargo.toml index 28910fc04..87ff282cc 100644 --- a/pgrx-pg-config/Cargo.toml +++ b/pgrx-pg-config/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-pg-config" -version = "0.12.8" +version = "0.12.9" authors = ["PgCentral Foundation, Inc. "] license = "MIT" description = "A Postgres pg_config wrapper for 'pgrx'" diff --git a/pgrx-pg-sys/Cargo.toml b/pgrx-pg-sys/Cargo.toml index a6bc7f5e6..7b27df2ff 100644 --- a/pgrx-pg-sys/Cargo.toml +++ b/pgrx-pg-sys/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-pg-sys" -version = "0.12.8" +version = "0.12.9" authors = ["PgCentral Foundation, Inc. "] license = "MIT" description = "Generated Rust bindings for Postgres internals, for use with 'pgrx'" diff --git a/pgrx-pg-sys/src/include/pg12.rs b/pgrx-pg-sys/src/include/pg12.rs index 153f5ff0c..3e2787b09 100644 --- a/pgrx-pg-sys/src/include/pg12.rs +++ b/pgrx-pg-sys/src/include/pg12.rs @@ -144,7 +144,7 @@ pub const PACKAGE_NAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL\0") }; #[allow(unsafe_code)] pub const PACKAGE_STRING: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 12.20\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 12.22\0") }; #[allow(unsafe_code)] pub const PACKAGE_TARNAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgresql\0") }; @@ -153,7 +153,7 @@ pub const PACKAGE_URL: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\0") }; #[allow(unsafe_code)] pub const PACKAGE_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"12.20\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"12.22\0") }; #[allow(unsafe_code)] pub const PG_KRB_SRVNAM: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres\0") }; @@ -162,11 +162,11 @@ pub const PG_MAJORVERSION: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"12\0") }; #[allow(unsafe_code)] pub const PG_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"12.20\0") }; -pub const PG_VERSION_NUM: u32 = 120020; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"12.22\0") }; +pub const PG_VERSION_NUM: u32 = 120022; #[allow(unsafe_code)] pub const PG_VERSION_STR: &::core::ffi::CStr = unsafe { - :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 12.20 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") + :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 12.22 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") }; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; @@ -988,7 +988,7 @@ pub const NSS_BUFLEN_PASSWD: u32 = 1024; pub const PGINVALID_SOCKET: i32 = -1; #[allow(unsafe_code)] pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 12.20\n\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 12.22\n\0") }; #[allow(unsafe_code)] pub const EXE: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\0") }; @@ -1752,6 +1752,7 @@ pub const ShareRowExclusiveLock: u32 = 6; pub const ExclusiveLock: u32 = 7; pub const AccessExclusiveLock: u32 = 8; pub const MaxLockMode: u32 = 8; +pub const InplaceUpdateTupleLock: u32 = 7; pub const LWLOCK_PADDED_SIZE: u32 = 128; pub const NUM_INDIVIDUAL_LWLOCKS: u32 = 48; pub const NUM_BUFFER_PARTITIONS: u32 = 128; @@ -2061,6 +2062,7 @@ pub const GUC_UNIT_S: u32 = 131072; pub const GUC_UNIT_MIN: u32 = 196608; pub const GUC_UNIT_TIME: u32 = 983040; pub const GUC_EXPLAIN: u32 = 1048576; +pub const GUC_ALLOW_IN_PARALLEL: u32 = 2097152; pub const GUC_UNIT: u32 = 1044480; #[allow(unsafe_code)] pub const DEFAULT_TABLE_ACCESS_METHOD: &::core::ffi::CStr = @@ -33004,7 +33006,10 @@ extern "C" { pub fn GetUserId() -> Oid; pub fn GetOuterUserId() -> Oid; pub fn GetSessionUserId() -> Oid; + pub fn GetSessionUserIsSuperuser() -> bool; pub fn GetAuthenticatedUserId() -> Oid; + pub fn GetAuthenticatedUserIsSuperuser() -> bool; + pub fn SetAuthenticatedUserId(userid: Oid, is_superuser: bool); pub fn GetUserIdAndSecContext(userid: *mut Oid, sec_context: *mut ::core::ffi::c_int); pub fn SetUserIdAndSecContext(userid: Oid, sec_context: ::core::ffi::c_int); pub fn InLocalUserIdChange() -> bool; @@ -33660,6 +33665,18 @@ extern "C" { direction: ScanDirection::Type, ) -> HeapTuple; pub fn systable_endscan_ordered(sysscan: SysScanDesc); + pub fn systable_inplace_update_begin( + relation: Relation, + indexId: Oid, + indexOK: bool, + snapshot: Snapshot, + nkeys: ::core::ffi::c_int, + key: *const ScanKeyData, + oldtupcopy: *mut HeapTuple, + state: *mut *mut ::core::ffi::c_void, + ); + pub fn systable_inplace_update_finish(state: *mut ::core::ffi::c_void, tuple: HeapTuple); + pub fn systable_inplace_update_cancel(state: *mut ::core::ffi::c_void); pub fn GetIndexAmRoutine(amhandler: Oid) -> *mut IndexAmRoutine; pub fn GetIndexAmRoutineByAmId(amoid: Oid, noerror: bool) -> *mut IndexAmRoutine; pub fn XLogBeginInsert(); @@ -34900,6 +34917,22 @@ extern "C" { buffer: *mut Buffer, tmfd: *mut TM_FailureData, ) -> TM_Result::Type; + pub fn heap_inplace_lock( + relation: Relation, + oldtup_ptr: HeapTuple, + buffer: Buffer, + release_callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ) -> bool; + pub fn heap_inplace_update_and_unlock( + relation: Relation, + oldtup: HeapTuple, + tuple: HeapTuple, + buffer: Buffer, + ); + pub fn heap_inplace_unlock(relation: Relation, oldtup: HeapTuple, buffer: Buffer); pub fn heap_inplace_update(relation: Relation, tuple: HeapTuple); pub fn heap_freeze_tuple( tuple: HeapTupleHeader, @@ -36855,6 +36888,8 @@ extern "C" { restart_seqs: bool, ); pub fn SetRelationHasSubclass(relationId: Oid, relhassubclass: bool); + pub fn CheckRelationTableSpaceMove(rel: Relation, newTableSpaceId: Oid) -> bool; + pub fn SetRelationTableSpace(rel: Relation, newTableSpaceId: Oid, newRelFileNode: Oid); pub fn renameatt(stmt: *mut RenameStmt) -> ObjectAddress; pub fn renameatt_type(stmt: *mut RenameStmt) -> ObjectAddress; pub fn RenameConstraint(stmt: *mut RenameStmt) -> ObjectAddress; @@ -44478,6 +44513,7 @@ extern "C" { key4: Datum, ) -> HeapTuple; pub fn ReleaseSysCache(tuple: HeapTuple); + pub fn SearchSysCacheLocked1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheCopy( cacheId: ::core::ffi::c_int, key1: Datum, @@ -44485,6 +44521,7 @@ extern "C" { key3: Datum, key4: Datum, ) -> HeapTuple; + pub fn SearchSysCacheLockedCopy1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheExists( cacheId: ::core::ffi::c_int, key1: Datum, diff --git a/pgrx-pg-sys/src/include/pg13.rs b/pgrx-pg-sys/src/include/pg13.rs index d559f294d..b1a23c103 100644 --- a/pgrx-pg-sys/src/include/pg13.rs +++ b/pgrx-pg-sys/src/include/pg13.rs @@ -144,7 +144,7 @@ pub const PACKAGE_NAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL\0") }; #[allow(unsafe_code)] pub const PACKAGE_STRING: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 13.16\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 13.18\0") }; #[allow(unsafe_code)] pub const PACKAGE_TARNAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgresql\0") }; @@ -153,7 +153,7 @@ pub const PACKAGE_URL: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"https://www.postgresql.org/\0") }; #[allow(unsafe_code)] pub const PACKAGE_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"13.16\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"13.18\0") }; #[allow(unsafe_code)] pub const PG_KRB_SRVNAM: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres\0") }; @@ -161,15 +161,15 @@ pub const PG_KRB_SRVNAM: &::core::ffi::CStr = pub const PG_MAJORVERSION: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"13\0") }; pub const PG_MAJORVERSION_NUM: u32 = 13; -pub const PG_MINORVERSION_NUM: u32 = 16; +pub const PG_MINORVERSION_NUM: u32 = 18; pub const PG_USE_STDBOOL: u32 = 1; #[allow(unsafe_code)] pub const PG_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"13.16\0") }; -pub const PG_VERSION_NUM: u32 = 130016; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"13.18\0") }; +pub const PG_VERSION_NUM: u32 = 130018; #[allow(unsafe_code)] pub const PG_VERSION_STR: &::core::ffi::CStr = unsafe { - :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 13.16 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") + :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 13.18 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") }; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; @@ -989,7 +989,7 @@ pub const NSS_BUFLEN_PASSWD: u32 = 1024; pub const PGINVALID_SOCKET: i32 = -1; #[allow(unsafe_code)] pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 13.16\n\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 13.18\n\0") }; #[allow(unsafe_code)] pub const EXE: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\0") }; @@ -1985,6 +1985,7 @@ pub const ShareRowExclusiveLock: u32 = 6; pub const ExclusiveLock: u32 = 7; pub const AccessExclusiveLock: u32 = 8; pub const MaxLockMode: u32 = 8; +pub const InplaceUpdateTupleLock: u32 = 7; pub const LWLOCK_PADDED_SIZE: u32 = 128; pub const NUM_INDIVIDUAL_LWLOCKS: u32 = 48; pub const NUM_BUFFER_PARTITIONS: u32 = 128; @@ -2267,6 +2268,7 @@ pub const GUC_UNIT_S: u32 = 131072; pub const GUC_UNIT_MIN: u32 = 196608; pub const GUC_UNIT_TIME: u32 = 983040; pub const GUC_EXPLAIN: u32 = 1048576; +pub const GUC_ALLOW_IN_PARALLEL: u32 = 2097152; pub const GUC_UNIT: u32 = 1044480; #[allow(unsafe_code)] pub const DEFAULT_TABLE_ACCESS_METHOD: &::core::ffi::CStr = @@ -6794,6 +6796,7 @@ impl Default for lconv { } } } +pub type pg_funcptr_t = ::core::option::Option; pub type Pointer = *mut ::core::ffi::c_char; pub type int8 = ::core::ffi::c_schar; pub type int16 = ::core::ffi::c_short; @@ -32642,11 +32645,11 @@ extern "C" { funcname: *const ::core::ffi::c_char, signalNotFound: bool, filehandle: *mut *mut ::core::ffi::c_void, - ) -> PGFunction; + ) -> *mut ::core::ffi::c_void; pub fn lookup_external_function( filehandle: *mut ::core::ffi::c_void, funcname: *const ::core::ffi::c_char, - ) -> PGFunction; + ) -> *mut ::core::ffi::c_void; pub fn load_file(filename: *const ::core::ffi::c_char, restricted: bool); pub fn find_rendezvous_variable( varName: *const ::core::ffi::c_char, @@ -34047,7 +34050,10 @@ extern "C" { pub fn GetUserId() -> Oid; pub fn GetOuterUserId() -> Oid; pub fn GetSessionUserId() -> Oid; + pub fn GetSessionUserIsSuperuser() -> bool; pub fn GetAuthenticatedUserId() -> Oid; + pub fn GetAuthenticatedUserIsSuperuser() -> bool; + pub fn SetAuthenticatedUserId(userid: Oid, is_superuser: bool); pub fn GetUserIdAndSecContext(userid: *mut Oid, sec_context: *mut ::core::ffi::c_int); pub fn SetUserIdAndSecContext(userid: Oid, sec_context: ::core::ffi::c_int); pub fn InLocalUserIdChange() -> bool; @@ -34729,6 +34735,18 @@ extern "C" { direction: ScanDirection::Type, ) -> HeapTuple; pub fn systable_endscan_ordered(sysscan: SysScanDesc); + pub fn systable_inplace_update_begin( + relation: Relation, + indexId: Oid, + indexOK: bool, + snapshot: Snapshot, + nkeys: ::core::ffi::c_int, + key: *const ScanKeyData, + oldtupcopy: *mut HeapTuple, + state: *mut *mut ::core::ffi::c_void, + ); + pub fn systable_inplace_update_finish(state: *mut ::core::ffi::c_void, tuple: HeapTuple); + pub fn systable_inplace_update_cancel(state: *mut ::core::ffi::c_void); pub fn GetIndexAmRoutine(amhandler: Oid) -> *mut IndexAmRoutine; pub fn GetIndexAmRoutineByAmId(amoid: Oid, noerror: bool) -> *mut IndexAmRoutine; pub fn detoast_external_attr(attr: *mut varlena) -> *mut varlena; @@ -35774,6 +35792,22 @@ extern "C" { buffer: *mut Buffer, tmfd: *mut TM_FailureData, ) -> TM_Result::Type; + pub fn heap_inplace_lock( + relation: Relation, + oldtup_ptr: HeapTuple, + buffer: Buffer, + release_callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ) -> bool; + pub fn heap_inplace_update_and_unlock( + relation: Relation, + oldtup: HeapTuple, + tuple: HeapTuple, + buffer: Buffer, + ); + pub fn heap_inplace_unlock(relation: Relation, oldtup: HeapTuple, buffer: Buffer); pub fn heap_inplace_update(relation: Relation, tuple: HeapTuple); pub fn heap_freeze_tuple( tuple: HeapTupleHeader, @@ -38073,6 +38107,8 @@ extern "C" { restart_seqs: bool, ); pub fn SetRelationHasSubclass(relationId: Oid, relhassubclass: bool); + pub fn CheckRelationTableSpaceMove(rel: Relation, newTableSpaceId: Oid) -> bool; + pub fn SetRelationTableSpace(rel: Relation, newTableSpaceId: Oid, newRelFileNode: Oid); pub fn renameatt(stmt: *mut RenameStmt) -> ObjectAddress; pub fn RenameConstraint(stmt: *mut RenameStmt) -> ObjectAddress; pub fn RenameRelation(stmt: *mut RenameStmt) -> ObjectAddress; @@ -45829,6 +45865,7 @@ extern "C" { key4: Datum, ) -> HeapTuple; pub fn ReleaseSysCache(tuple: HeapTuple); + pub fn SearchSysCacheLocked1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheCopy( cacheId: ::core::ffi::c_int, key1: Datum, @@ -45836,6 +45873,7 @@ extern "C" { key3: Datum, key4: Datum, ) -> HeapTuple; + pub fn SearchSysCacheLockedCopy1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheExists( cacheId: ::core::ffi::c_int, key1: Datum, diff --git a/pgrx-pg-sys/src/include/pg14.rs b/pgrx-pg-sys/src/include/pg14.rs index b12738655..12431e0c5 100644 --- a/pgrx-pg-sys/src/include/pg14.rs +++ b/pgrx-pg-sys/src/include/pg14.rs @@ -144,7 +144,7 @@ pub const PACKAGE_NAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL\0") }; #[allow(unsafe_code)] pub const PACKAGE_STRING: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 14.13\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 14.15\0") }; #[allow(unsafe_code)] pub const PACKAGE_TARNAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgresql\0") }; @@ -153,7 +153,7 @@ pub const PACKAGE_URL: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"https://www.postgresql.org/\0") }; #[allow(unsafe_code)] pub const PACKAGE_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"14.13\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"14.15\0") }; #[allow(unsafe_code)] pub const PG_KRB_SRVNAM: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres\0") }; @@ -161,15 +161,15 @@ pub const PG_KRB_SRVNAM: &::core::ffi::CStr = pub const PG_MAJORVERSION: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"14\0") }; pub const PG_MAJORVERSION_NUM: u32 = 14; -pub const PG_MINORVERSION_NUM: u32 = 13; +pub const PG_MINORVERSION_NUM: u32 = 15; pub const PG_USE_STDBOOL: u32 = 1; #[allow(unsafe_code)] pub const PG_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"14.13\0") }; -pub const PG_VERSION_NUM: u32 = 140013; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"14.15\0") }; +pub const PG_VERSION_NUM: u32 = 140015; #[allow(unsafe_code)] pub const PG_VERSION_STR: &::core::ffi::CStr = unsafe { - :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 14.13 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") + :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 14.15 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") }; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; @@ -986,7 +986,7 @@ pub const NSS_BUFLEN_PASSWD: u32 = 1024; pub const PGINVALID_SOCKET: i32 = -1; #[allow(unsafe_code)] pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 14.13\n\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 14.15\n\0") }; #[allow(unsafe_code)] pub const EXE: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\0") }; @@ -2006,6 +2006,7 @@ pub const ShareRowExclusiveLock: u32 = 6; pub const ExclusiveLock: u32 = 7; pub const AccessExclusiveLock: u32 = 8; pub const MaxLockMode: u32 = 8; +pub const InplaceUpdateTupleLock: u32 = 7; pub const CATALOG_VERSION_NO: u32 = 202107181; pub const OIDCHARS: u32 = 10; pub const FORKNAMECHARS: u32 = 4; @@ -2287,6 +2288,7 @@ pub const GUC_UNIT_S: u32 = 131072; pub const GUC_UNIT_MIN: u32 = 196608; pub const GUC_UNIT_TIME: u32 = 983040; pub const GUC_EXPLAIN: u32 = 1048576; +pub const GUC_ALLOW_IN_PARALLEL: u32 = 2097152; pub const GUC_UNIT: u32 = 1044480; #[allow(unsafe_code)] pub const DEFAULT_TABLE_ACCESS_METHOD: &::core::ffi::CStr = @@ -12930,6 +12932,7 @@ pub struct ResultRelInfo { pub ri_newTupleSlot: *mut TupleTableSlot, pub ri_oldTupleSlot: *mut TupleTableSlot, pub ri_projectNewInfoValid: bool, + pub ri_needLockTagTuple: bool, pub ri_TrigDesc: *mut TriggerDesc, pub ri_TrigFunctions: *mut FmgrInfo, pub ri_TrigWhenExprs: *mut *mut ExprState, @@ -36178,7 +36181,10 @@ extern "C" { pub fn GetUserId() -> Oid; pub fn GetOuterUserId() -> Oid; pub fn GetSessionUserId() -> Oid; + pub fn GetSessionUserIsSuperuser() -> bool; pub fn GetAuthenticatedUserId() -> Oid; + pub fn GetAuthenticatedUserIsSuperuser() -> bool; + pub fn SetAuthenticatedUserId(userid: Oid, is_superuser: bool); pub fn GetUserIdAndSecContext(userid: *mut Oid, sec_context: *mut ::core::ffi::c_int); pub fn SetUserIdAndSecContext(userid: Oid, sec_context: ::core::ffi::c_int); pub fn InLocalUserIdChange() -> bool; @@ -36530,6 +36536,18 @@ extern "C" { direction: ScanDirection::Type, ) -> HeapTuple; pub fn systable_endscan_ordered(sysscan: SysScanDesc); + pub fn systable_inplace_update_begin( + relation: Relation, + indexId: Oid, + indexOK: bool, + snapshot: Snapshot, + nkeys: ::core::ffi::c_int, + key: *const ScanKeyData, + oldtupcopy: *mut HeapTuple, + state: *mut *mut ::core::ffi::c_void, + ); + pub fn systable_inplace_update_finish(state: *mut ::core::ffi::c_void, tuple: HeapTuple); + pub fn systable_inplace_update_cancel(state: *mut ::core::ffi::c_void); pub fn GetIndexAmRoutine(amhandler: Oid) -> *mut IndexAmRoutine; pub fn GetIndexAmRoutineByAmId(amoid: Oid, noerror: bool) -> *mut IndexAmRoutine; pub fn detoast_external_attr(attr: *mut varlena) -> *mut varlena; @@ -37864,6 +37882,22 @@ extern "C" { buffer: *mut Buffer, tmfd: *mut TM_FailureData, ) -> TM_Result::Type; + pub fn heap_inplace_lock( + relation: Relation, + oldtup_ptr: HeapTuple, + buffer: Buffer, + release_callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ) -> bool; + pub fn heap_inplace_update_and_unlock( + relation: Relation, + oldtup: HeapTuple, + tuple: HeapTuple, + buffer: Buffer, + ); + pub fn heap_inplace_unlock(relation: Relation, oldtup: HeapTuple, buffer: Buffer); pub fn heap_inplace_update(relation: Relation, tuple: HeapTuple); pub fn heap_freeze_tuple( tuple: HeapTupleHeader, @@ -48569,6 +48603,7 @@ extern "C" { key4: Datum, ) -> HeapTuple; pub fn ReleaseSysCache(tuple: HeapTuple); + pub fn SearchSysCacheLocked1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheCopy( cacheId: ::core::ffi::c_int, key1: Datum, @@ -48576,6 +48611,7 @@ extern "C" { key3: Datum, key4: Datum, ) -> HeapTuple; + pub fn SearchSysCacheLockedCopy1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheExists( cacheId: ::core::ffi::c_int, key1: Datum, diff --git a/pgrx-pg-sys/src/include/pg15.rs b/pgrx-pg-sys/src/include/pg15.rs index 309b60f38..e3bd60908 100644 --- a/pgrx-pg-sys/src/include/pg15.rs +++ b/pgrx-pg-sys/src/include/pg15.rs @@ -147,7 +147,7 @@ pub const PACKAGE_NAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL\0") }; #[allow(unsafe_code)] pub const PACKAGE_STRING: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 15.8\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 15.10\0") }; #[allow(unsafe_code)] pub const PACKAGE_TARNAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgresql\0") }; @@ -156,7 +156,7 @@ pub const PACKAGE_URL: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"https://www.postgresql.org/\0") }; #[allow(unsafe_code)] pub const PACKAGE_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"15.8\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"15.10\0") }; #[allow(unsafe_code)] pub const PG_KRB_SRVNAM: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres\0") }; @@ -164,15 +164,15 @@ pub const PG_KRB_SRVNAM: &::core::ffi::CStr = pub const PG_MAJORVERSION: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"15\0") }; pub const PG_MAJORVERSION_NUM: u32 = 15; -pub const PG_MINORVERSION_NUM: u32 = 8; +pub const PG_MINORVERSION_NUM: u32 = 10; pub const PG_USE_STDBOOL: u32 = 1; #[allow(unsafe_code)] pub const PG_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"15.8\0") }; -pub const PG_VERSION_NUM: u32 = 150008; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"15.10\0") }; +pub const PG_VERSION_NUM: u32 = 150010; #[allow(unsafe_code)] pub const PG_VERSION_STR: &::core::ffi::CStr = unsafe { - :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 15.8 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") + :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 15.10 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") }; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; @@ -578,7 +578,7 @@ pub const PG_BINARY_W: &::core::ffi::CStr = pub const PGINVALID_SOCKET: i32 = -1; #[allow(unsafe_code)] pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 15.8\n\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 15.10\n\0") }; #[allow(unsafe_code)] pub const EXE: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\0") }; @@ -2027,6 +2027,7 @@ pub const ShareRowExclusiveLock: u32 = 6; pub const ExclusiveLock: u32 = 7; pub const AccessExclusiveLock: u32 = 8; pub const MaxLockMode: u32 = 8; +pub const InplaceUpdateTupleLock: u32 = 7; pub const RM_MAX_ID: u32 = 255; pub const RM_MIN_CUSTOM_ID: u32 = 128; pub const RM_MAX_CUSTOM_ID: u32 = 255; @@ -2318,6 +2319,7 @@ pub const GUC_UNIT_MIN: u32 = 196608; pub const GUC_UNIT_TIME: u32 = 983040; pub const GUC_EXPLAIN: u32 = 1048576; pub const GUC_RUNTIME_COMPUTED: u32 = 2097152; +pub const GUC_ALLOW_IN_PARALLEL: u32 = 4194304; pub const GUC_UNIT: u32 = 1044480; #[allow(unsafe_code)] pub const DEFAULT_TABLE_ACCESS_METHOD: &::core::ffi::CStr = @@ -16478,6 +16480,7 @@ pub struct ResultRelInfo { pub ri_newTupleSlot: *mut TupleTableSlot, pub ri_oldTupleSlot: *mut TupleTableSlot, pub ri_projectNewInfoValid: bool, + pub ri_needLockTagTuple: bool, pub ri_TrigDesc: *mut TriggerDesc, pub ri_TrigFunctions: *mut FmgrInfo, pub ri_TrigWhenExprs: *mut *mut ExprState, @@ -36368,7 +36371,10 @@ extern "C" { pub fn GetUserId() -> Oid; pub fn GetOuterUserId() -> Oid; pub fn GetSessionUserId() -> Oid; + pub fn GetSessionUserIsSuperuser() -> bool; pub fn GetAuthenticatedUserId() -> Oid; + pub fn GetAuthenticatedUserIsSuperuser() -> bool; + pub fn SetAuthenticatedUserId(userid: Oid, is_superuser: bool); pub fn GetUserIdAndSecContext(userid: *mut Oid, sec_context: *mut ::core::ffi::c_int); pub fn SetUserIdAndSecContext(userid: Oid, sec_context: ::core::ffi::c_int); pub fn InLocalUserIdChange() -> bool; @@ -36762,6 +36768,18 @@ extern "C" { direction: ScanDirection::Type, ) -> HeapTuple; pub fn systable_endscan_ordered(sysscan: SysScanDesc); + pub fn systable_inplace_update_begin( + relation: Relation, + indexId: Oid, + indexOK: bool, + snapshot: Snapshot, + nkeys: ::core::ffi::c_int, + key: *const ScanKeyData, + oldtupcopy: *mut HeapTuple, + state: *mut *mut ::core::ffi::c_void, + ); + pub fn systable_inplace_update_finish(state: *mut ::core::ffi::c_void, tuple: HeapTuple); + pub fn systable_inplace_update_cancel(state: *mut ::core::ffi::c_void); pub fn GetIndexAmRoutine(amhandler: Oid) -> *mut IndexAmRoutine; pub fn GetIndexAmRoutineByAmId(amoid: Oid, noerror: bool) -> *mut IndexAmRoutine; pub fn detoast_external_attr(attr: *mut varlena) -> *mut varlena; @@ -38144,6 +38162,22 @@ extern "C" { buffer: *mut Buffer, tmfd: *mut TM_FailureData, ) -> TM_Result::Type; + pub fn heap_inplace_lock( + relation: Relation, + oldtup_ptr: HeapTuple, + buffer: Buffer, + release_callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ) -> bool; + pub fn heap_inplace_update_and_unlock( + relation: Relation, + oldtup: HeapTuple, + tuple: HeapTuple, + buffer: Buffer, + ); + pub fn heap_inplace_unlock(relation: Relation, oldtup: HeapTuple, buffer: Buffer); pub fn heap_inplace_update(relation: Relation, tuple: HeapTuple); pub fn heap_freeze_tuple( tuple: HeapTupleHeader, @@ -49173,6 +49207,7 @@ extern "C" { key4: Datum, ) -> HeapTuple; pub fn ReleaseSysCache(tuple: HeapTuple); + pub fn SearchSysCacheLocked1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheCopy( cacheId: ::core::ffi::c_int, key1: Datum, @@ -49180,6 +49215,7 @@ extern "C" { key3: Datum, key4: Datum, ) -> HeapTuple; + pub fn SearchSysCacheLockedCopy1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheExists( cacheId: ::core::ffi::c_int, key1: Datum, diff --git a/pgrx-pg-sys/src/include/pg16.rs b/pgrx-pg-sys/src/include/pg16.rs index a10d79410..8ce3fd094 100644 --- a/pgrx-pg-sys/src/include/pg16.rs +++ b/pgrx-pg-sys/src/include/pg16.rs @@ -147,7 +147,7 @@ pub const PACKAGE_NAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL\0") }; #[allow(unsafe_code)] pub const PACKAGE_STRING: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 16.4\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 16.6\0") }; #[allow(unsafe_code)] pub const PACKAGE_TARNAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgresql\0") }; @@ -156,7 +156,7 @@ pub const PACKAGE_URL: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"https://www.postgresql.org/\0") }; #[allow(unsafe_code)] pub const PACKAGE_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"16.4\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"16.6\0") }; #[allow(unsafe_code)] pub const PG_KRB_SRVNAM: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres\0") }; @@ -164,15 +164,15 @@ pub const PG_KRB_SRVNAM: &::core::ffi::CStr = pub const PG_MAJORVERSION: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"16\0") }; pub const PG_MAJORVERSION_NUM: u32 = 16; -pub const PG_MINORVERSION_NUM: u32 = 4; +pub const PG_MINORVERSION_NUM: u32 = 6; pub const PG_USE_STDBOOL: u32 = 1; #[allow(unsafe_code)] pub const PG_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"16.4\0") }; -pub const PG_VERSION_NUM: u32 = 160004; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"16.6\0") }; +pub const PG_VERSION_NUM: u32 = 160006; #[allow(unsafe_code)] pub const PG_VERSION_STR: &::core::ffi::CStr = unsafe { - :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 16.4 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") + :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 16.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") }; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; @@ -579,7 +579,7 @@ pub const PG_BINARY_W: &::core::ffi::CStr = pub const PGINVALID_SOCKET: i32 = -1; #[allow(unsafe_code)] pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 16.4\n\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 16.6\n\0") }; #[allow(unsafe_code)] pub const EXE: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\0") }; @@ -2031,6 +2031,7 @@ pub const ShareRowExclusiveLock: u32 = 6; pub const ExclusiveLock: u32 = 7; pub const AccessExclusiveLock: u32 = 8; pub const MaxLockMode: u32 = 8; +pub const InplaceUpdateTupleLock: u32 = 7; pub const SYNC_METHOD_FSYNC: u32 = 0; pub const SYNC_METHOD_FDATASYNC: u32 = 1; pub const SYNC_METHOD_OPEN: u32 = 2; @@ -3050,6 +3051,7 @@ pub const GUC_IS_NAME: u32 = 2048; pub const GUC_NOT_WHILE_SEC_REST: u32 = 4096; pub const GUC_DISALLOW_IN_AUTO_FILE: u32 = 8192; pub const GUC_RUNTIME_COMPUTED: u32 = 16384; +pub const GUC_ALLOW_IN_PARALLEL: u32 = 32768; pub const GUC_UNIT_KB: u32 = 16777216; pub const GUC_UNIT_BLOCKS: u32 = 33554432; pub const GUC_UNIT_XBLOCKS: u32 = 50331648; @@ -17000,6 +17002,7 @@ pub struct ResultRelInfo { pub ri_newTupleSlot: *mut TupleTableSlot, pub ri_oldTupleSlot: *mut TupleTableSlot, pub ri_projectNewInfoValid: bool, + pub ri_needLockTagTuple: bool, pub ri_TrigDesc: *mut TriggerDesc, pub ri_TrigFunctions: *mut FmgrInfo, pub ri_TrigWhenExprs: *mut *mut ExprState, @@ -34907,6 +34910,7 @@ extern "C" { str_: *const ::core::ffi::c_char, ) -> ::core::ffi::c_int; pub fn geterrcode() -> ::core::ffi::c_int; + pub fn geterrlevel() -> ::core::ffi::c_int; pub fn geterrposition() -> ::core::ffi::c_int; pub fn getinternalerrposition() -> ::core::ffi::c_int; pub fn errsave_start(context: *mut Node, domain: *const ::core::ffi::c_char) -> bool; @@ -37370,7 +37374,10 @@ extern "C" { pub fn GetUserId() -> Oid; pub fn GetOuterUserId() -> Oid; pub fn GetSessionUserId() -> Oid; + pub fn GetSessionUserIsSuperuser() -> bool; pub fn GetAuthenticatedUserId() -> Oid; + pub fn GetAuthenticatedUserIsSuperuser() -> bool; + pub fn SetAuthenticatedUserId(userid: Oid, is_superuser: bool); pub fn GetUserIdAndSecContext(userid: *mut Oid, sec_context: *mut ::core::ffi::c_int); pub fn SetUserIdAndSecContext(userid: Oid, sec_context: ::core::ffi::c_int); pub fn InLocalUserIdChange() -> bool; @@ -37808,6 +37815,18 @@ extern "C" { direction: ScanDirection::Type, ) -> HeapTuple; pub fn systable_endscan_ordered(sysscan: SysScanDesc); + pub fn systable_inplace_update_begin( + relation: Relation, + indexId: Oid, + indexOK: bool, + snapshot: Snapshot, + nkeys: ::core::ffi::c_int, + key: *const ScanKeyData, + oldtupcopy: *mut HeapTuple, + state: *mut *mut ::core::ffi::c_void, + ); + pub fn systable_inplace_update_finish(state: *mut ::core::ffi::c_void, tuple: HeapTuple); + pub fn systable_inplace_update_cancel(state: *mut ::core::ffi::c_void); pub fn GetIndexAmRoutine(amhandler: Oid) -> *mut IndexAmRoutine; pub fn GetIndexAmRoutineByAmId(amoid: Oid, noerror: bool) -> *mut IndexAmRoutine; pub fn detoast_external_attr(attr: *mut varlena) -> *mut varlena; @@ -38632,6 +38651,22 @@ extern "C" { buffer: *mut Buffer, tmfd: *mut TM_FailureData, ) -> TM_Result::Type; + pub fn heap_inplace_lock( + relation: Relation, + oldtup_ptr: HeapTuple, + buffer: Buffer, + release_callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ) -> bool; + pub fn heap_inplace_update_and_unlock( + relation: Relation, + oldtup: HeapTuple, + tuple: HeapTuple, + buffer: Buffer, + ); + pub fn heap_inplace_unlock(relation: Relation, oldtup: HeapTuple, buffer: Buffer); pub fn heap_inplace_update(relation: Relation, tuple: HeapTuple); pub fn heap_prepare_freeze_tuple( tuple: HeapTupleHeader, @@ -50386,6 +50421,7 @@ extern "C" { key4: Datum, ) -> HeapTuple; pub fn ReleaseSysCache(tuple: HeapTuple); + pub fn SearchSysCacheLocked1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheCopy( cacheId: ::core::ffi::c_int, key1: Datum, @@ -50393,6 +50429,7 @@ extern "C" { key3: Datum, key4: Datum, ) -> HeapTuple; + pub fn SearchSysCacheLockedCopy1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheExists( cacheId: ::core::ffi::c_int, key1: Datum, diff --git a/pgrx-pg-sys/src/include/pg17.rs b/pgrx-pg-sys/src/include/pg17.rs index e1daa4d37..3efcd104a 100644 --- a/pgrx-pg-sys/src/include/pg17.rs +++ b/pgrx-pg-sys/src/include/pg17.rs @@ -146,7 +146,7 @@ pub const PACKAGE_NAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL\0") }; #[allow(unsafe_code)] pub const PACKAGE_STRING: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 17.0\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"PostgreSQL 17.2\0") }; #[allow(unsafe_code)] pub const PACKAGE_TARNAME: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgresql\0") }; @@ -155,7 +155,7 @@ pub const PACKAGE_URL: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"https://www.postgresql.org/\0") }; #[allow(unsafe_code)] pub const PACKAGE_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"17.0\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"17.2\0") }; #[allow(unsafe_code)] pub const PG_KRB_SRVNAM: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres\0") }; @@ -163,15 +163,15 @@ pub const PG_KRB_SRVNAM: &::core::ffi::CStr = pub const PG_MAJORVERSION: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"17\0") }; pub const PG_MAJORVERSION_NUM: u32 = 17; -pub const PG_MINORVERSION_NUM: u32 = 0; +pub const PG_MINORVERSION_NUM: u32 = 2; pub const PG_USE_STDBOOL: u32 = 1; #[allow(unsafe_code)] pub const PG_VERSION: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"17.0\0") }; -pub const PG_VERSION_NUM: u32 = 170000; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"17.2\0") }; +pub const PG_VERSION_NUM: u32 = 170002; #[allow(unsafe_code)] pub const PG_VERSION_STR: &::core::ffi::CStr = unsafe { - :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 17.0 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") + :: core :: ffi :: CStr :: from_bytes_with_nul_unchecked (b"PostgreSQL 17.2 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit\0") }; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; @@ -579,7 +579,7 @@ pub const PG_BINARY_W: &::core::ffi::CStr = pub const PGINVALID_SOCKET: i32 = -1; #[allow(unsafe_code)] pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = - unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 17.0\n\0") }; + unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"postgres (PostgreSQL) 17.2\n\0") }; #[allow(unsafe_code)] pub const EXE: &::core::ffi::CStr = unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\0") }; @@ -1485,6 +1485,7 @@ pub const ShareRowExclusiveLock: u32 = 6; pub const ExclusiveLock: u32 = 7; pub const AccessExclusiveLock: u32 = 8; pub const MaxLockMode: u32 = 8; +pub const InplaceUpdateTupleLock: u32 = 7; pub const TYPECACHE_EQ_OPR: u32 = 1; pub const TYPECACHE_LT_OPR: u32 = 2; pub const TYPECACHE_GT_OPR: u32 = 4; @@ -14251,6 +14252,7 @@ pub struct ResultRelInfo { pub ri_newTupleSlot: *mut TupleTableSlot, pub ri_oldTupleSlot: *mut TupleTableSlot, pub ri_projectNewInfoValid: bool, + pub ri_needLockTagTuple: bool, pub ri_TrigDesc: *mut TriggerDesc, pub ri_TrigFunctions: *mut FmgrInfo, pub ri_TrigWhenExprs: *mut *mut ExprState, @@ -37785,6 +37787,18 @@ extern "C" { direction: ScanDirection::Type, ) -> HeapTuple; pub fn systable_endscan_ordered(sysscan: SysScanDesc); + pub fn systable_inplace_update_begin( + relation: Relation, + indexId: Oid, + indexOK: bool, + snapshot: Snapshot, + nkeys: ::core::ffi::c_int, + key: *const ScanKeyData, + oldtupcopy: *mut HeapTuple, + state: *mut *mut ::core::ffi::c_void, + ); + pub fn systable_inplace_update_finish(state: *mut ::core::ffi::c_void, tuple: HeapTuple); + pub fn systable_inplace_update_cancel(state: *mut ::core::ffi::c_void); pub fn GetIndexAmRoutine(amhandler: Oid) -> *mut IndexAmRoutine; pub fn GetIndexAmRoutineByAmId(amoid: Oid, noerror: bool) -> *mut IndexAmRoutine; pub fn lookup_type_cache(type_id: Oid, flags: ::core::ffi::c_int) -> *mut TypeCacheEntry; @@ -38987,7 +39001,9 @@ extern "C" { pub fn GetUserId() -> Oid; pub fn GetOuterUserId() -> Oid; pub fn GetSessionUserId() -> Oid; + pub fn GetSessionUserIsSuperuser() -> bool; pub fn GetAuthenticatedUserId() -> Oid; + pub fn SetAuthenticatedUserId(userid: Oid); pub fn GetUserIdAndSecContext(userid: *mut Oid, sec_context: *mut ::core::ffi::c_int); pub fn SetUserIdAndSecContext(userid: Oid, sec_context: ::core::ffi::c_int); pub fn InLocalUserIdChange() -> bool; @@ -40360,6 +40376,22 @@ extern "C" { buffer: *mut Buffer, tmfd: *mut TM_FailureData, ) -> TM_Result::Type; + pub fn heap_inplace_lock( + relation: Relation, + oldtup_ptr: HeapTuple, + buffer: Buffer, + release_callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ) -> bool; + pub fn heap_inplace_update_and_unlock( + relation: Relation, + oldtup: HeapTuple, + tuple: HeapTuple, + buffer: Buffer, + ); + pub fn heap_inplace_unlock(relation: Relation, oldtup: HeapTuple, buffer: Buffer); pub fn heap_inplace_update(relation: Relation, tuple: HeapTuple); pub fn heap_prepare_freeze_tuple( tuple: HeapTupleHeader, @@ -52134,6 +52166,7 @@ extern "C" { key4: Datum, ) -> HeapTuple; pub fn ReleaseSysCache(tuple: HeapTuple); + pub fn SearchSysCacheLocked1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheCopy( cacheId: ::core::ffi::c_int, key1: Datum, @@ -52141,6 +52174,7 @@ extern "C" { key3: Datum, key4: Datum, ) -> HeapTuple; + pub fn SearchSysCacheLockedCopy1(cacheId: ::core::ffi::c_int, key1: Datum) -> HeapTuple; pub fn SearchSysCacheExists( cacheId: ::core::ffi::c_int, key1: Datum, diff --git a/pgrx-sql-entity-graph/Cargo.toml b/pgrx-sql-entity-graph/Cargo.toml index b50c893c3..7295fd615 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.12.8" +version = "0.12.9" authors = ["PgCentral Foundation, Inc. "] license = "MIT" description = "Sql Entity Graph for `pgrx`" diff --git a/pgrx-tests/Cargo.toml b/pgrx-tests/Cargo.toml index f664875f5..045e1fb9b 100644 --- a/pgrx-tests/Cargo.toml +++ b/pgrx-tests/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx-tests" -version = "0.12.8" +version = "0.12.9" authors = ["PgCentral Foundation, Inc. "] license = "MIT" description = "Test framework for 'pgrx'-based Postgres extensions" @@ -72,7 +72,7 @@ rand = "0.8.5" [dependencies.pgrx] # Not unified in workspace due to default-features key path = "../pgrx" default-features = false -version = "=0.12.8" +version = "=0.12.9" [dev-dependencies] eyre.workspace = true # testing functions that return `eyre::Result` diff --git a/pgrx/Cargo.toml b/pgrx/Cargo.toml index 85b66bcbf..438dcf064 100644 --- a/pgrx/Cargo.toml +++ b/pgrx/Cargo.toml @@ -10,7 +10,7 @@ [package] name = "pgrx" -version = "0.12.8" +version = "0.12.9" authors = ["PgCentral Foundation, Inc. "] license = "MIT" description = "pgrx: A Rust framework for creating Postgres extensions"