diff --git a/Cargo.lock b/Cargo.lock index 4c90e985e..0f3664376 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -270,16 +270,16 @@ checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[package]] name = "camino" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fd178c5af4d59e83498ef15cf3f154e1a6f9d091270cb86283c65ef44e9ef0" +checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412" dependencies = [ "serde", ] [[package]] name = "cargo-pgx" -version = "0.4.5" +version = "0.5.0-beta.0" dependencies = [ "atty", "cargo_metadata", @@ -365,9 +365,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clang-sys" -version = "1.3.1" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cc00842eed744b858222c4c9faf7243aafc6d33f92f96935263ef4d8a41ce21" +checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b" dependencies = [ "glob", "libc", @@ -475,9 +475,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cortex-m" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ff967e867ca14eba0c34ac25cd71ea98c678e741e3915d923999bb2fe7c826" +checksum = "cd20d4ac4aa86f4f75f239d59e542ef67de87cce2c282818dc6e84155d3ea126" dependencies = [ "bare-metal 0.2.5", "bitfield", @@ -730,13 +730,11 @@ checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e" [[package]] name = "flate2" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if", "crc32fast", - "libc", "miniz_oxide", ] @@ -996,9 +994,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown", @@ -1176,9 +1174,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", ] @@ -1287,9 +1285,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "openssl" @@ -1348,9 +1346,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d8d0b2f198229de29dca79676f2738ff952edf3fde542eb8bf94d8c21b435" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "owo-colors" @@ -1363,9 +1361,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", "parking_lot_core", @@ -1407,9 +1405,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" +checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" dependencies = [ "fixedbitset", "indexmap", @@ -1417,7 +1415,7 @@ dependencies = [ [[package]] name = "pgx" -version = "0.4.5" +version = "0.5.0-beta.0" dependencies = [ "atomic-traits", "bitflags", @@ -1444,7 +1442,7 @@ dependencies = [ [[package]] name = "pgx-macros" -version = "0.4.5" +version = "0.5.0-beta.0" dependencies = [ "pgx-utils", "proc-macro2", @@ -1456,7 +1454,7 @@ dependencies = [ [[package]] name = "pgx-pg-sys" -version = "0.4.5" +version = "0.5.0-beta.0" dependencies = [ "bindgen", "build-deps", @@ -1478,7 +1476,7 @@ dependencies = [ [[package]] name = "pgx-tests" -version = "0.4.5" +version = "0.5.0-beta.0" dependencies = [ "eyre", "libc", @@ -1498,7 +1496,7 @@ dependencies = [ [[package]] name = "pgx-utils" -version = "0.4.5" +version = "0.5.0-beta.0" dependencies = [ "atty", "convert_case", @@ -1627,9 +1625,9 @@ checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "prettyplease" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e07e3a46d0771a8a06b5f4441527802830b43e679ba12f44960f48dd4c6803" +checksum = "f28f53e8b192565862cf99343194579a022eb9c7dd3a8d03134734803c7b3125" dependencies = [ "proc-macro2", "syn", @@ -1794,9 +1792,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -1814,9 +1812,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "remove_dir_all" @@ -1902,6 +1900,21 @@ dependencies = [ "semver 0.11.0", ] +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.9", +] + +[[package]] +name = "rustversion" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" + [[package]] name = "ryu" version = "1.0.10" @@ -1925,12 +1938,12 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi", + "windows-sys", ] [[package]] @@ -2561,9 +2574,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "c6d5d669b51467dcf7b2f1a796ce0f955f05f01cafda6c19d6e95f730df29238" dependencies = [ "getrandom 0.2.6", ] diff --git a/cargo-pgx/Cargo.toml b/cargo-pgx/Cargo.toml index 86b8cddf3..2222b1ee2 100644 --- a/cargo-pgx/Cargo.toml +++ b/cargo-pgx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-pgx" -version = "0.4.5" +version = "0.5.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Cargo subcommand for 'pgx' to make Postgres extension development easy" @@ -24,7 +24,7 @@ semver = "1.0.9" owo-colors = { version = "3.4.0", features = [ "supports-colors" ] } env_proxy = "0.4.1" num_cpus = "1.13.1" -pgx-utils = { path = "../pgx-utils", version = "=0.4.5" } +pgx-utils = { path = "../pgx-utils", version = "=0.5.0-beta.0" } proc-macro2 = { version = "1.0.39", features = [ "span-locations" ] } quote = "1.0.18" rayon = "1.5.3" diff --git a/cargo-pgx/src/templates/cargo_toml b/cargo-pgx/src/templates/cargo_toml index 4201f5384..bb4244f75 100644 --- a/cargo-pgx/src/templates/cargo_toml +++ b/cargo-pgx/src/templates/cargo_toml @@ -17,10 +17,10 @@ pg14 = ["pgx/pg14", "pgx-tests/pg14" ] pg_test = [] [dependencies] -pgx = "=0.4.5" +pgx = "=0.5.0-beta.0" [dev-dependencies] -pgx-tests = "=0.4.5" +pgx-tests = "=0.5.0-beta.0" [profile.dev] panic = "unwind" diff --git a/nix/templates/default/Cargo.toml b/nix/templates/default/Cargo.toml index 015c6acbc..f2f06e4c4 100644 --- a/nix/templates/default/Cargo.toml +++ b/nix/templates/default/Cargo.toml @@ -17,13 +17,13 @@ pg14 = ["pgx/pg14", "pgx-tests/pg14" ] pg_test = [] [dependencies] -pgx = "=0.4.5" -pgx-macros = "=0.4.5" -pgx-utils = "=0.4.5" +pgx = "=0.5.0-beta.0" +pgx-macros = "=0.5.0-beta.0" +pgx-utils = "=0.5.0-beta.0" [dev-dependencies] -pgx-tests = "=0.4.5" +pgx-tests = "=0.5.0-beta.0" tempfile = "3.2.0" once_cell = "1.7.2" diff --git a/pgx-macros/Cargo.toml b/pgx-macros/Cargo.toml index f4fb4c90f..70cb2f206 100644 --- a/pgx-macros/Cargo.toml +++ b/pgx-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx-macros" -version = "0.4.5" +version = "0.5.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Proc Macros for 'pgx'" @@ -19,7 +19,7 @@ proc-macro = true rustc-args = ["--cfg", "docsrs"] [dependencies] -pgx-utils = { path = "../pgx-utils", version = "=0.4.5" } +pgx-utils = { path = "../pgx-utils", version = "=0.5.0-beta.0" } proc-macro2 = "1.0.39" quote = "1.0.18" syn = { version = "1.0.95", features = [ "extra-traits", "full", "fold", "parsing" ] } diff --git a/pgx-pg-sys/Cargo.toml b/pgx-pg-sys/Cargo.toml index fc542ac75..5bcf9c912 100644 --- a/pgx-pg-sys/Cargo.toml +++ b/pgx-pg-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx-pg-sys" -version = "0.4.5" +version = "0.5.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Generated Rust bindings for Postgres internals, for use with 'pgx'" @@ -30,7 +30,7 @@ rustdoc-args = ["--cfg", "docsrs"] [dependencies] memoffset = "0.6.5" once_cell = "1.10.0" -pgx-macros = { path = "../pgx-macros/", version = "=0.4.5" } +pgx-macros = { path = "../pgx-macros/", version = "=0.5.0-beta.0" } # polyfill until #![feature(strict_provenance)] stabilizes sptr = "0.3" @@ -39,7 +39,7 @@ bindgen = { version = "0.59.2", default-features = false, features = ["runtime"] build-deps = "0.1.4" owo-colors = "3.4.0" num_cpus = "1.13.1" -pgx-utils = { path = "../pgx-utils/", version = "=0.4.5" } +pgx-utils = { path = "../pgx-utils/", version = "=0.5.0-beta.0" } proc-macro2 = "1.0.39" quote = "1.0.18" rayon = "1.5.3" diff --git a/pgx-pg-sys/src/pg10.rs b/pgx-pg-sys/src/pg10.rs index 788733615..43dc78b48 100644 --- a/pgx-pg-sys/src/pg10.rs +++ b/pgx-pg-sys/src/pg10.rs @@ -1,5 +1,7 @@ use crate as pg_sys; -use crate::PgNode; +#[cfg(any(feature = "pg12", feature = "pg13", feature = "pg14"))] +use crate::NullableDatum; +use crate::{Datum, PgNode}; #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit { @@ -322,16 +324,16 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &[u8; 26usize] = b"pgsql-bugs@postgresql.org\0"; pub const PACKAGE_NAME: &[u8; 11usize] = b"PostgreSQL\0"; -pub const PACKAGE_STRING: &[u8; 17usize] = b"PostgreSQL 10.20\0"; +pub const PACKAGE_STRING: &[u8; 17usize] = b"PostgreSQL 10.21\0"; pub const PACKAGE_TARNAME: &[u8; 11usize] = b"postgresql\0"; pub const PACKAGE_URL: &[u8; 1usize] = b"\0"; -pub const PACKAGE_VERSION: &[u8; 6usize] = b"10.20\0"; +pub const PACKAGE_VERSION: &[u8; 6usize] = b"10.21\0"; pub const PG_KRB_SRVNAM: &[u8; 9usize] = b"postgres\0"; pub const PG_MAJORVERSION: &[u8; 3usize] = b"10\0"; -pub const PG_VERSION: &[u8; 6usize] = b"10.20\0"; -pub const PG_VERSION_NUM: u32 = 100020; +pub const PG_VERSION: &[u8; 6usize] = b"10.21\0"; +pub const PG_VERSION_NUM: u32 = 100021; pub const PG_VERSION_STR: &[u8; 78usize] = - b"PostgreSQL 10.20 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.2.0, 64-bit\0"; + b"PostgreSQL 10.21 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 12.1.0, 64-bit\0"; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_LONG: u32 = 8; pub const SIZEOF_OFF_T: u32 = 8; @@ -898,6 +900,8 @@ pub const SOL_NFC: u32 = 280; pub const SOL_KCM: u32 = 281; pub const SOL_TLS: u32 = 282; pub const SOL_XDP: u32 = 283; +pub const SOL_MPTCP: u32 = 284; +pub const SOL_MCTP: u32 = 285; pub const SOMAXCONN: u32 = 4096; pub const _BITS_SOCKADDR_H: u32 = 1; pub const _SS_SIZE: u32 = 128; @@ -1180,7 +1184,7 @@ pub const NI_DGRAM: u32 = 16; pub const _PWD_H: u32 = 1; pub const NSS_BUFLEN_PASSWD: u32 = 1024; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &[u8; 29usize] = b"postgres (PostgreSQL) 10.20\n\0"; +pub const PG_BACKEND_VERSIONSTR: &[u8; 29usize] = b"postgres (PostgreSQL) 10.21\n\0"; pub const EXE: &[u8; 1usize] = b"\0"; pub const DEVNULL: &[u8; 10usize] = b"/dev/null\0"; pub const PG_IOLBF: u32 = 1; @@ -1996,6 +2000,8 @@ pub const PROC_RESERVED: u32 = 32; pub const PROC_VACUUM_STATE_MASK: u32 = 14; pub const FP_LOCK_SLOTS_PER_BACKEND: u32 = 16; pub const INVALID_PGPROCNO: u32 = 2147483647; +pub const DELAY_CHKPT_START: u32 = 1; +pub const DELAY_CHKPT_COMPLETE: u32 = 2; pub const NUM_AUXILIARY_PROCS: u32 = 4; pub const PGSTAT_STAT_PERMANENT_DIRECTORY: &[u8; 8usize] = b"pg_stat\0"; pub const PGSTAT_STAT_PERMANENT_FILENAME: &[u8; 20usize] = b"pg_stat/global.stat\0"; @@ -11132,7 +11138,6 @@ pub struct varattrib_1b_e { pub va_tag: uint8, pub va_data: __IncompleteArrayField<::std::os::raw::c_char>, } -pub type Datum = usize; pub type DatumPtr = *mut Datum; pub unsafe fn ExceptionalCondition( arg_conditionName: *const ::std::os::raw::c_char, @@ -11187,7 +11192,6 @@ impl Default for FmgrInfo { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct FunctionCallInfoData { pub flinfo: *mut FmgrInfo, pub context: fmNodePtr, @@ -14389,7 +14393,6 @@ pub const ScanDirection_ForwardScanDirection: ScanDirection = 1; pub type ScanDirection = ::std::os::raw::c_int; pub type StrategyNumber = uint16; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ScanKeyData { pub sk_flags: ::std::os::raw::c_int, pub sk_attno: AttrNumber, @@ -16851,7 +16854,6 @@ impl Default for Var { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct Const { pub xpr: Expr, pub consttype: Oid, @@ -19455,13 +19457,21 @@ pub unsafe fn InstrAccumParallelQuery(arg_result: *mut BufferUsage) { }) } #[repr(C)] -#[derive(Debug, Default, Copy, Clone)] pub struct ParamExternData { pub value: Datum, pub isnull: bool, pub pflags: uint16, pub ptype: Oid, } +impl Default for ParamExternData { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} pub type ParamListInfo = *mut ParamListInfoData; pub type ParamFetchHook = ::std::option::Option< unsafe extern "C" fn(params: ParamListInfo, paramid: ::std::os::raw::c_int), @@ -19470,7 +19480,6 @@ pub type ParserSetupHook = ::std::option::Option< unsafe extern "C" fn(pstate: *mut ParseState, arg: *mut ::std::os::raw::c_void), >; #[repr(C)] -#[derive(Debug)] pub struct ParamListInfoData { pub paramFetch: ParamFetchHook, pub paramFetchArg: *mut ::std::os::raw::c_void, @@ -19490,7 +19499,6 @@ impl Default for ParamListInfoData { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ParamExecData { pub execPlan: *mut ::std::os::raw::c_void, pub value: Datum, @@ -21778,7 +21786,6 @@ pub type ExprStateEvalFunc = ::std::option::Option< ) -> Datum, >; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprState { pub tag: Node, pub flags: uint8, @@ -21838,7 +21845,6 @@ impl Default for IndexInfo { } pub type ExprContextCallbackFunction = ::std::option::Option; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext_CB { pub next: *mut ExprContext_CB, pub function: ExprContextCallbackFunction, @@ -21854,7 +21860,6 @@ impl Default for ExprContext_CB { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext { pub type_: NodeTag, pub ecxt_scantuple: *mut TupleTableSlot, @@ -21913,7 +21918,6 @@ impl Default for ReturnSetInfo { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ProjectionInfo { pub type_: NodeTag, pub pi_state: ExprState, @@ -22309,7 +22313,6 @@ impl Default for WindowFuncExprState { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct SetExprState { pub type_: NodeTag, pub expr: *mut Expr, @@ -22335,7 +22338,6 @@ impl Default for SetExprState { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct SubPlanState { pub type_: NodeTag, pub subplan: *mut SubPlan, @@ -23310,7 +23312,6 @@ pub struct WindowStatePerAggData { } pub type WindowStatePerAgg = *mut WindowStatePerAggData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct WindowAggState { pub ss: ScanState, pub funcs: *mut List, @@ -38105,6 +38106,7 @@ pub struct PGPROC { pub heldLocks: LOCKMASK, pub waitLSN: XLogRecPtr, pub syncRepState: ::std::os::raw::c_int, + pub delayChkptEnd: bool, pub syncRepLinks: SHM_QUEUE, pub myProcLocks: [SHM_QUEUE; 16usize], pub subxids: XidCache, @@ -40014,7 +40016,6 @@ pub struct GISTPageOpaqueData { } pub type GISTPageOpaque = *mut GISTPageOpaqueData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GIST_SPLITVEC { pub spl_left: *mut OffsetNumber, pub spl_nleft: ::std::os::raw::c_int, @@ -40035,7 +40036,6 @@ impl Default for GIST_SPLITVEC { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GISTENTRY { pub key: Datum, pub rel: Relation, @@ -40053,7 +40053,6 @@ impl Default for GISTENTRY { } } #[repr(C)] -#[derive(Debug)] pub struct GistEntryVector { pub n: int32, pub vector: __IncompleteArrayField, @@ -49591,7 +49590,6 @@ pub const BgWorkerStartTime_BgWorkerStart_ConsistentState: BgWorkerStartTime = 1 pub const BgWorkerStartTime_BgWorkerStart_RecoveryFinished: BgWorkerStartTime = 2; pub type BgWorkerStartTime = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct BackgroundWorker { pub bgw_name: [::std::os::raw::c_char; 64usize], pub bgw_flags: ::std::os::raw::c_int, @@ -62604,6 +62602,18 @@ pub unsafe fn GetVirtualXIDsDelayingChkpt( GetVirtualXIDsDelayingChkpt(arg_nvxids) }) } +pub unsafe fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, +) -> *mut VirtualTransactionId { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, + ) -> *mut VirtualTransactionId; + } + GetVirtualXIDsDelayingChkptEnd(arg_nvxids) + }) +} pub unsafe fn HaveVirtualXIDsDelayingChkpt( arg_vxids: *mut VirtualTransactionId, arg_nvxids: ::std::os::raw::c_int, @@ -62618,6 +62628,20 @@ pub unsafe fn HaveVirtualXIDsDelayingChkpt( HaveVirtualXIDsDelayingChkpt(arg_vxids, arg_nvxids) }) } +pub unsafe fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, +) -> bool { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, + ) -> bool; + } + HaveVirtualXIDsDelayingChkptEnd(arg_vxids, arg_nvxids) + }) +} pub unsafe fn BackendPidGetProc(arg_pid: ::std::os::raw::c_int) -> *mut PGPROC { crate::submodules::setjmp::pg_guard_ffi_boundary(move || { extern "C" { diff --git a/pgx-pg-sys/src/pg11.rs b/pgx-pg-sys/src/pg11.rs index 6d6e05cb7..0eb8dec0b 100644 --- a/pgx-pg-sys/src/pg11.rs +++ b/pgx-pg-sys/src/pg11.rs @@ -1,5 +1,7 @@ use crate as pg_sys; -use crate::PgNode; +#[cfg(any(feature = "pg12", feature = "pg13", feature = "pg14"))] +use crate::NullableDatum; +use crate::{Datum, PgNode}; #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit { @@ -318,16 +320,16 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &[u8; 26usize] = b"pgsql-bugs@postgresql.org\0"; pub const PACKAGE_NAME: &[u8; 11usize] = b"PostgreSQL\0"; -pub const PACKAGE_STRING: &[u8; 17usize] = b"PostgreSQL 11.15\0"; +pub const PACKAGE_STRING: &[u8; 17usize] = b"PostgreSQL 11.16\0"; pub const PACKAGE_TARNAME: &[u8; 11usize] = b"postgresql\0"; pub const PACKAGE_URL: &[u8; 1usize] = b"\0"; -pub const PACKAGE_VERSION: &[u8; 6usize] = b"11.15\0"; +pub const PACKAGE_VERSION: &[u8; 6usize] = b"11.16\0"; pub const PG_KRB_SRVNAM: &[u8; 9usize] = b"postgres\0"; pub const PG_MAJORVERSION: &[u8; 3usize] = b"11\0"; -pub const PG_VERSION: &[u8; 6usize] = b"11.15\0"; -pub const PG_VERSION_NUM: u32 = 110015; +pub const PG_VERSION: &[u8; 6usize] = b"11.16\0"; +pub const PG_VERSION_NUM: u32 = 110016; pub const PG_VERSION_STR: &[u8; 78usize] = - b"PostgreSQL 11.15 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.2.0, 64-bit\0"; + b"PostgreSQL 11.16 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 12.1.0, 64-bit\0"; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; pub const SIZEOF_LONG: u32 = 8; @@ -897,6 +899,8 @@ pub const SOL_NFC: u32 = 280; pub const SOL_KCM: u32 = 281; pub const SOL_TLS: u32 = 282; pub const SOL_XDP: u32 = 283; +pub const SOL_MPTCP: u32 = 284; +pub const SOL_MCTP: u32 = 285; pub const SOMAXCONN: u32 = 4096; pub const _BITS_SOCKADDR_H: u32 = 1; pub const _SS_SIZE: u32 = 128; @@ -1179,7 +1183,7 @@ pub const NI_DGRAM: u32 = 16; pub const _PWD_H: u32 = 1; pub const NSS_BUFLEN_PASSWD: u32 = 1024; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &[u8; 29usize] = b"postgres (PostgreSQL) 11.15\n\0"; +pub const PG_BACKEND_VERSIONSTR: &[u8; 29usize] = b"postgres (PostgreSQL) 11.16\n\0"; pub const EXE: &[u8; 1usize] = b"\0"; pub const DEVNULL: &[u8; 10usize] = b"/dev/null\0"; pub const PG_IOLBF: u32 = 1; @@ -1942,6 +1946,8 @@ pub const PROC_RESERVED: u32 = 32; pub const PROC_VACUUM_STATE_MASK: u32 = 14; pub const FP_LOCK_SLOTS_PER_BACKEND: u32 = 16; pub const INVALID_PGPROCNO: u32 = 2147483647; +pub const DELAY_CHKPT_START: u32 = 1; +pub const DELAY_CHKPT_COMPLETE: u32 = 2; pub const NUM_AUXILIARY_PROCS: u32 = 4; pub const PGSTAT_STAT_PERMANENT_DIRECTORY: &[u8; 8usize] = b"pg_stat\0"; pub const PGSTAT_STAT_PERMANENT_FILENAME: &[u8; 20usize] = b"pg_stat/global.stat\0"; @@ -14843,7 +14849,6 @@ pub struct varattrib_1b_e { pub va_tag: uint8, pub va_data: __IncompleteArrayField<::std::os::raw::c_char>, } -pub type Datum = usize; pub type fmNodePtr = *mut Node; pub type fmAggrefPtr = *mut Aggref; pub type fmExprContextCallbackFunction = ::std::option::Option; @@ -14874,7 +14879,6 @@ impl Default for FmgrInfo { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct FunctionCallInfoData { pub flinfo: *mut FmgrInfo, pub context: fmNodePtr, @@ -17713,7 +17717,6 @@ pub const ScanDirection_ForwardScanDirection: ScanDirection = 1; pub type ScanDirection = ::std::os::raw::c_int; pub type StrategyNumber = uint16; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ScanKeyData { pub sk_flags: ::std::os::raw::c_int, pub sk_attno: AttrNumber, @@ -20409,7 +20412,6 @@ impl Default for Var { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct Const { pub xpr: Expr, pub consttype: Oid, @@ -23046,13 +23048,21 @@ pub unsafe fn InstrAccumParallelQuery(arg_result: *mut BufferUsage) { }) } #[repr(C)] -#[derive(Debug, Default, Copy, Clone)] pub struct ParamExternData { pub value: Datum, pub isnull: bool, pub pflags: uint16, pub ptype: Oid, } +impl Default for ParamExternData { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} pub type ParamListInfo = *mut ParamListInfoData; pub type ParamFetchHook = ::std::option::Option< unsafe extern "C" fn( @@ -23075,7 +23085,6 @@ pub type ParserSetupHook = ::std::option::Option< unsafe extern "C" fn(pstate: *mut ParseState, arg: *mut ::std::os::raw::c_void), >; #[repr(C)] -#[derive(Debug)] pub struct ParamListInfoData { pub paramFetch: ParamFetchHook, pub paramFetchArg: *mut ::std::os::raw::c_void, @@ -23096,7 +23105,6 @@ impl Default for ParamListInfoData { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ParamExecData { pub execPlan: *mut ::std::os::raw::c_void, pub value: Datum, @@ -26948,7 +26956,6 @@ pub type ExprStateEvalFunc = ::std::option::Option< ) -> Datum, >; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprState { pub tag: Node, pub flags: uint8, @@ -27014,7 +27021,6 @@ impl Default for IndexInfo { } pub type ExprContextCallbackFunction = ::std::option::Option; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext_CB { pub next: *mut ExprContext_CB, pub function: ExprContextCallbackFunction, @@ -27030,7 +27036,6 @@ impl Default for ExprContext_CB { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext { pub type_: NodeTag, pub ecxt_scantuple: *mut TupleTableSlot, @@ -27089,7 +27094,6 @@ impl Default for ReturnSetInfo { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ProjectionInfo { pub type_: NodeTag, pub pi_state: ExprState, @@ -27516,7 +27520,6 @@ impl Default for WindowFuncExprState { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct SetExprState { pub type_: NodeTag, pub expr: *mut Expr, @@ -27542,7 +27545,6 @@ impl Default for SetExprState { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct SubPlanState { pub type_: NodeTag, pub subplan: *mut SubPlan, @@ -28549,7 +28551,6 @@ pub struct WindowStatePerAggData { } pub type WindowStatePerAgg = *mut WindowStatePerAggData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct WindowAggState { pub ss: ScanState, pub funcs: *mut List, @@ -40796,6 +40797,7 @@ pub struct PGPROC { pub heldLocks: LOCKMASK, pub waitLSN: XLogRecPtr, pub syncRepState: ::std::os::raw::c_int, + pub delayChkptEnd: bool, pub syncRepLinks: SHM_QUEUE, pub myProcLocks: [SHM_QUEUE; 16usize], pub subxids: XidCache, @@ -43637,7 +43639,6 @@ pub struct GISTPageOpaqueData { } pub type GISTPageOpaque = *mut GISTPageOpaqueData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GIST_SPLITVEC { pub spl_left: *mut OffsetNumber, pub spl_nleft: ::std::os::raw::c_int, @@ -43658,7 +43659,6 @@ impl Default for GIST_SPLITVEC { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GISTENTRY { pub key: Datum, pub rel: Relation, @@ -43676,7 +43676,6 @@ impl Default for GISTENTRY { } } #[repr(C)] -#[derive(Debug)] pub struct GistEntryVector { pub n: int32, pub vector: __IncompleteArrayField, @@ -56845,7 +56844,6 @@ pub const BgWorkerStartTime_BgWorkerStart_ConsistentState: BgWorkerStartTime = 1 pub const BgWorkerStartTime_BgWorkerStart_RecoveryFinished: BgWorkerStartTime = 2; pub type BgWorkerStartTime = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct BackgroundWorker { pub bgw_name: [::std::os::raw::c_char; 96usize], pub bgw_type: [::std::os::raw::c_char; 96usize], @@ -69086,6 +69084,18 @@ pub unsafe fn GetVirtualXIDsDelayingChkpt( GetVirtualXIDsDelayingChkpt(arg_nvxids) }) } +pub unsafe fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, +) -> *mut VirtualTransactionId { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, + ) -> *mut VirtualTransactionId; + } + GetVirtualXIDsDelayingChkptEnd(arg_nvxids) + }) +} pub unsafe fn HaveVirtualXIDsDelayingChkpt( arg_vxids: *mut VirtualTransactionId, arg_nvxids: ::std::os::raw::c_int, @@ -69100,6 +69110,20 @@ pub unsafe fn HaveVirtualXIDsDelayingChkpt( HaveVirtualXIDsDelayingChkpt(arg_vxids, arg_nvxids) }) } +pub unsafe fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, +) -> bool { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, + ) -> bool; + } + HaveVirtualXIDsDelayingChkptEnd(arg_vxids, arg_nvxids) + }) +} pub unsafe fn BackendPidGetProc(arg_pid: ::std::os::raw::c_int) -> *mut PGPROC { crate::submodules::setjmp::pg_guard_ffi_boundary(move || { extern "C" { diff --git a/pgx-pg-sys/src/pg12.rs b/pgx-pg-sys/src/pg12.rs index 6e49d2277..c13f53a0f 100644 --- a/pgx-pg-sys/src/pg12.rs +++ b/pgx-pg-sys/src/pg12.rs @@ -1,5 +1,7 @@ use crate as pg_sys; -use crate::PgNode; +#[cfg(any(feature = "pg12", feature = "pg13", feature = "pg14"))] +use crate::NullableDatum; +use crate::{Datum, PgNode}; #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit { @@ -313,6 +315,7 @@ pub const HAVE__BUILTIN_BSWAP64: u32 = 1; pub const HAVE__BUILTIN_CLZ: u32 = 1; pub const HAVE__BUILTIN_CONSTANT_P: u32 = 1; pub const HAVE__BUILTIN_CTZ: u32 = 1; +pub const HAVE__BUILTIN_FRAME_ADDRESS: u32 = 1; pub const HAVE__BUILTIN_OP_OVERFLOW: u32 = 1; pub const HAVE__BUILTIN_POPCOUNT: u32 = 1; pub const HAVE__BUILTIN_TYPES_COMPATIBLE_P: u32 = 1; @@ -324,16 +327,16 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &[u8; 32usize] = b"pgsql-bugs@lists.postgresql.org\0"; pub const PACKAGE_NAME: &[u8; 11usize] = b"PostgreSQL\0"; -pub const PACKAGE_STRING: &[u8; 17usize] = b"PostgreSQL 12.10\0"; +pub const PACKAGE_STRING: &[u8; 17usize] = b"PostgreSQL 12.11\0"; pub const PACKAGE_TARNAME: &[u8; 11usize] = b"postgresql\0"; pub const PACKAGE_URL: &[u8; 1usize] = b"\0"; -pub const PACKAGE_VERSION: &[u8; 6usize] = b"12.10\0"; +pub const PACKAGE_VERSION: &[u8; 6usize] = b"12.11\0"; pub const PG_KRB_SRVNAM: &[u8; 9usize] = b"postgres\0"; pub const PG_MAJORVERSION: &[u8; 3usize] = b"12\0"; -pub const PG_VERSION: &[u8; 6usize] = b"12.10\0"; -pub const PG_VERSION_NUM: u32 = 120010; +pub const PG_VERSION: &[u8; 6usize] = b"12.11\0"; +pub const PG_VERSION_NUM: u32 = 120011; pub const PG_VERSION_STR: &[u8; 78usize] = - b"PostgreSQL 12.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.2.0, 64-bit\0"; + b"PostgreSQL 12.11 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 12.1.0, 64-bit\0"; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; pub const SIZEOF_LONG: u32 = 8; @@ -903,6 +906,8 @@ pub const SOL_NFC: u32 = 280; pub const SOL_KCM: u32 = 281; pub const SOL_TLS: u32 = 282; pub const SOL_XDP: u32 = 283; +pub const SOL_MPTCP: u32 = 284; +pub const SOL_MCTP: u32 = 285; pub const SOMAXCONN: u32 = 4096; pub const _BITS_SOCKADDR_H: u32 = 1; pub const _SS_SIZE: u32 = 128; @@ -1185,7 +1190,7 @@ pub const NI_DGRAM: u32 = 16; pub const _PWD_H: u32 = 1; pub const NSS_BUFLEN_PASSWD: u32 = 1024; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &[u8; 29usize] = b"postgres (PostgreSQL) 12.10\n\0"; +pub const PG_BACKEND_VERSIONSTR: &[u8; 29usize] = b"postgres (PostgreSQL) 12.11\n\0"; pub const EXE: &[u8; 1usize] = b"\0"; pub const DEVNULL: &[u8; 10usize] = b"/dev/null\0"; pub const USE_REPL_SNPRINTF: u32 = 1; @@ -1990,6 +1995,8 @@ pub const PROC_RESERVED: u32 = 32; pub const PROC_VACUUM_STATE_MASK: u32 = 14; pub const FP_LOCK_SLOTS_PER_BACKEND: u32 = 16; pub const INVALID_PGPROCNO: u32 = 2147483647; +pub const DELAY_CHKPT_START: u32 = 1; +pub const DELAY_CHKPT_COMPLETE: u32 = 2; pub const NUM_AUXILIARY_PROCS: u32 = 4; pub const PGSTAT_STAT_PERMANENT_DIRECTORY: &[u8; 8usize] = b"pg_stat\0"; pub const PGSTAT_STAT_PERMANENT_FILENAME: &[u8; 20usize] = b"pg_stat/global.stat\0"; @@ -15041,13 +15048,6 @@ pub struct varattrib_1b_e { pub va_tag: uint8, pub va_data: __IncompleteArrayField<::std::os::raw::c_char>, } -pub type Datum = usize; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct NullableDatum { - pub value: Datum, - pub isnull: bool, -} pub type fmNodePtr = *mut Node; pub type fmAggrefPtr = *mut Aggref; pub type fmExprContextCallbackFunction = ::std::option::Option; @@ -15078,7 +15078,6 @@ impl Default for FmgrInfo { } } #[repr(C)] -#[derive(Debug)] pub struct FunctionCallInfoBaseData { pub flinfo: *mut FmgrInfo, pub context: fmNodePtr, @@ -20662,13 +20661,21 @@ pub unsafe fn pairingheap_remove(arg_heap: *mut pairingheap, arg_node: *mut pair }) } #[repr(C)] -#[derive(Debug, Default, Copy, Clone)] pub struct ParamExternData { pub value: Datum, pub isnull: bool, pub pflags: uint16, pub ptype: Oid, } +impl Default for ParamExternData { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} pub type ParamListInfo = *mut ParamListInfoData; pub type ParamFetchHook = ::std::option::Option< unsafe extern "C" fn( @@ -20691,7 +20698,6 @@ pub type ParserSetupHook = ::std::option::Option< unsafe extern "C" fn(pstate: *mut ParseState, arg: *mut ::std::os::raw::c_void), >; #[repr(C)] -#[derive(Debug)] pub struct ParamListInfoData { pub paramFetch: ParamFetchHook, pub paramFetchArg: *mut ::std::os::raw::c_void, @@ -20712,7 +20718,6 @@ impl Default for ParamListInfoData { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ParamExecData { pub execPlan: *mut ::std::os::raw::c_void, pub value: Datum, @@ -20926,7 +20931,6 @@ impl Default for Var { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct Const { pub xpr: Expr, pub consttype: Oid, @@ -26472,7 +26476,6 @@ pub type ExprStateEvalFunc = ::std::option::Option< ) -> Datum, >; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprState { pub tag: Node, pub flags: uint8, @@ -26538,7 +26541,6 @@ impl Default for IndexInfo { } pub type ExprContextCallbackFunction = ::std::option::Option; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext_CB { pub next: *mut ExprContext_CB, pub function: ExprContextCallbackFunction, @@ -26554,7 +26556,6 @@ impl Default for ExprContext_CB { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext { pub type_: NodeTag, pub ecxt_scantuple: *mut TupleTableSlot, @@ -26613,7 +26614,6 @@ impl Default for ReturnSetInfo { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ProjectionInfo { pub type_: NodeTag, pub pi_state: ExprState, @@ -27071,7 +27071,6 @@ impl Default for SetExprState { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct SubPlanState { pub type_: NodeTag, pub subplan: *mut SubPlan, @@ -28109,7 +28108,6 @@ pub struct WindowStatePerAggData { } pub type WindowStatePerAgg = *mut WindowStatePerAggData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct WindowAggState { pub ss: ScanState, pub funcs: *mut List, @@ -38808,6 +38806,7 @@ pub struct PGPROC { pub heldLocks: LOCKMASK, pub waitLSN: XLogRecPtr, pub syncRepState: ::std::os::raw::c_int, + pub delayChkptEnd: bool, pub syncRepLinks: SHM_QUEUE, pub myProcLocks: [SHM_QUEUE; 16usize], pub subxids: XidCache, @@ -39791,6 +39790,7 @@ pub type WaitEventIPC = ::std::os::raw::c_uint; pub const WaitEventTimeout_WAIT_EVENT_BASE_BACKUP_THROTTLE: WaitEventTimeout = 150994944; pub const WaitEventTimeout_WAIT_EVENT_PG_SLEEP: WaitEventTimeout = 150994945; pub const WaitEventTimeout_WAIT_EVENT_RECOVERY_APPLY_DELAY: WaitEventTimeout = 150994946; +pub const WaitEventTimeout_WAIT_EVENT_REGISTER_SYNC_REQUEST: WaitEventTimeout = 150994947; pub type WaitEventTimeout = ::std::os::raw::c_uint; pub const WaitEventIO_WAIT_EVENT_BUFFILE_READ: WaitEventIO = 167772160; pub const WaitEventIO_WAIT_EVENT_BUFFILE_WRITE: WaitEventIO = 167772161; @@ -40606,7 +40606,6 @@ pub unsafe fn pgstat_fetch_global() -> *mut PgStat_GlobalStats { }) } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ScanKeyData { pub sk_flags: ::std::os::raw::c_int, pub sk_attno: AttrNumber, @@ -42467,7 +42466,6 @@ pub struct GISTPageOpaqueData { } pub type GISTPageOpaque = *mut GISTPageOpaqueData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GIST_SPLITVEC { pub spl_left: *mut OffsetNumber, pub spl_nleft: ::std::os::raw::c_int, @@ -42488,7 +42486,6 @@ impl Default for GIST_SPLITVEC { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GISTENTRY { pub key: Datum, pub rel: Relation, @@ -42511,7 +42508,6 @@ pub struct GISTDeletedPageContents { pub deleteXid: FullTransactionId, } #[repr(C)] -#[derive(Debug)] pub struct GistEntryVector { pub n: int32, pub vector: __IncompleteArrayField, @@ -47716,6 +47712,32 @@ pub unsafe fn heap_fetch( heap_fetch(arg_relation, arg_snapshot, arg_tuple, arg_userbuf) }) } +pub unsafe fn heap_fetch_extended( + arg_relation: Relation, + arg_snapshot: Snapshot, + arg_tuple: HeapTuple, + arg_userbuf: *mut Buffer, + arg_keep_buf: bool, +) -> bool { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn heap_fetch_extended( + arg_relation: Relation, + arg_snapshot: Snapshot, + arg_tuple: HeapTuple, + arg_userbuf: *mut Buffer, + arg_keep_buf: bool, + ) -> bool; + } + heap_fetch_extended( + arg_relation, + arg_snapshot, + arg_tuple, + arg_userbuf, + arg_keep_buf, + ) + }) +} pub unsafe fn heap_hot_search_buffer( arg_tid: ItemPointer, arg_relation: Relation, @@ -58242,7 +58264,6 @@ pub const BgWorkerStartTime_BgWorkerStart_ConsistentState: BgWorkerStartTime = 1 pub const BgWorkerStartTime_BgWorkerStart_RecoveryFinished: BgWorkerStartTime = 2; pub type BgWorkerStartTime = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct BackgroundWorker { pub bgw_name: [::std::os::raw::c_char; 96usize], pub bgw_type: [::std::os::raw::c_char; 96usize], @@ -72378,6 +72399,18 @@ pub unsafe fn GetVirtualXIDsDelayingChkpt( GetVirtualXIDsDelayingChkpt(arg_nvxids) }) } +pub unsafe fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, +) -> *mut VirtualTransactionId { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, + ) -> *mut VirtualTransactionId; + } + GetVirtualXIDsDelayingChkptEnd(arg_nvxids) + }) +} pub unsafe fn HaveVirtualXIDsDelayingChkpt( arg_vxids: *mut VirtualTransactionId, arg_nvxids: ::std::os::raw::c_int, @@ -72392,6 +72425,20 @@ pub unsafe fn HaveVirtualXIDsDelayingChkpt( HaveVirtualXIDsDelayingChkpt(arg_vxids, arg_nvxids) }) } +pub unsafe fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, +) -> bool { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, + ) -> bool; + } + HaveVirtualXIDsDelayingChkptEnd(arg_vxids, arg_nvxids) + }) +} pub unsafe fn BackendPidGetProc(arg_pid: ::std::os::raw::c_int) -> *mut PGPROC { crate::submodules::setjmp::pg_guard_ffi_boundary(move || { extern "C" { diff --git a/pgx-pg-sys/src/pg13.rs b/pgx-pg-sys/src/pg13.rs index 8c7de425f..2f09c536a 100644 --- a/pgx-pg-sys/src/pg13.rs +++ b/pgx-pg-sys/src/pg13.rs @@ -1,5 +1,7 @@ use crate as pg_sys; -use crate::PgNode; +#[cfg(any(feature = "pg12", feature = "pg13", feature = "pg14"))] +use crate::NullableDatum; +use crate::{Datum, PgNode}; #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit { @@ -177,7 +179,7 @@ pub const ALIGNOF_LONG: u32 = 8; pub const ALIGNOF_PG_INT128_TYPE: u32 = 16; pub const ALIGNOF_SHORT: u32 = 2; pub const BLCKSZ: u32 = 8192; -pub const CONFIGURE_ARGS : & [u8 ; 106usize] = b" '--prefix=/home/atelier/.pgx/13.6/pgx-install' '--with-pgport=28813' '--enable-debug' '--enable-cassert'\0" ; +pub const CONFIGURE_ARGS : & [u8 ; 106usize] = b" '--prefix=/home/atelier/.pgx/13.7/pgx-install' '--with-pgport=28813' '--enable-debug' '--enable-cassert'\0" ; pub const DEF_PGPORT: u32 = 28813; pub const DEF_PGPORT_STR: &[u8; 6usize] = b"28813\0"; pub const ENABLE_THREAD_SAFETY: u32 = 1; @@ -305,6 +307,7 @@ pub const HAVE__BUILTIN_BSWAP64: u32 = 1; pub const HAVE__BUILTIN_CLZ: u32 = 1; pub const HAVE__BUILTIN_CONSTANT_P: u32 = 1; pub const HAVE__BUILTIN_CTZ: u32 = 1; +pub const HAVE__BUILTIN_FRAME_ADDRESS: u32 = 1; pub const HAVE__BUILTIN_OP_OVERFLOW: u32 = 1; pub const HAVE__BUILTIN_POPCOUNT: u32 = 1; pub const HAVE__BUILTIN_TYPES_COMPATIBLE_P: u32 = 1; @@ -316,19 +319,19 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &[u8; 32usize] = b"pgsql-bugs@lists.postgresql.org\0"; pub const PACKAGE_NAME: &[u8; 11usize] = b"PostgreSQL\0"; -pub const PACKAGE_STRING: &[u8; 16usize] = b"PostgreSQL 13.6\0"; +pub const PACKAGE_STRING: &[u8; 16usize] = b"PostgreSQL 13.7\0"; pub const PACKAGE_TARNAME: &[u8; 11usize] = b"postgresql\0"; pub const PACKAGE_URL: &[u8; 28usize] = b"https://www.postgresql.org/\0"; -pub const PACKAGE_VERSION: &[u8; 5usize] = b"13.6\0"; +pub const PACKAGE_VERSION: &[u8; 5usize] = b"13.7\0"; pub const PG_KRB_SRVNAM: &[u8; 9usize] = b"postgres\0"; pub const PG_MAJORVERSION: &[u8; 3usize] = b"13\0"; pub const PG_MAJORVERSION_NUM: u32 = 13; -pub const PG_MINORVERSION_NUM: u32 = 6; +pub const PG_MINORVERSION_NUM: u32 = 7; pub const PG_USE_STDBOOL: u32 = 1; -pub const PG_VERSION: &[u8; 5usize] = b"13.6\0"; -pub const PG_VERSION_NUM: u32 = 130006; +pub const PG_VERSION: &[u8; 5usize] = b"13.7\0"; +pub const PG_VERSION_NUM: u32 = 130007; pub const PG_VERSION_STR: &[u8; 77usize] = - b"PostgreSQL 13.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.2.0, 64-bit\0"; + b"PostgreSQL 13.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 12.1.0, 64-bit\0"; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; pub const SIZEOF_LONG: u32 = 8; @@ -897,6 +900,8 @@ pub const SOL_NFC: u32 = 280; pub const SOL_KCM: u32 = 281; pub const SOL_TLS: u32 = 282; pub const SOL_XDP: u32 = 283; +pub const SOL_MPTCP: u32 = 284; +pub const SOL_MCTP: u32 = 285; pub const SOMAXCONN: u32 = 4096; pub const _BITS_SOCKADDR_H: u32 = 1; pub const _SS_SIZE: u32 = 128; @@ -1179,7 +1184,7 @@ pub const NI_DGRAM: u32 = 16; pub const _PWD_H: u32 = 1; pub const NSS_BUFLEN_PASSWD: u32 = 1024; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &[u8; 28usize] = b"postgres (PostgreSQL) 13.6\n\0"; +pub const PG_BACKEND_VERSIONSTR: &[u8; 28usize] = b"postgres (PostgreSQL) 13.7\n\0"; pub const EXE: &[u8; 1usize] = b"\0"; pub const DEVNULL: &[u8; 10usize] = b"/dev/null\0"; pub const USE_REPL_SNPRINTF: u32 = 1; @@ -2217,6 +2222,8 @@ pub const PROC_VACUUM_STATE_MASK: u32 = 14; pub const PROC_COPYABLE_FLAGS: u32 = 2; pub const FP_LOCK_SLOTS_PER_BACKEND: u32 = 16; pub const INVALID_PGPROCNO: u32 = 2147483647; +pub const DELAY_CHKPT_START: u32 = 1; +pub const DELAY_CHKPT_COMPLETE: u32 = 2; pub const NUM_AUXILIARY_PROCS: u32 = 4; pub const PGSTAT_STAT_PERMANENT_DIRECTORY: &[u8; 8usize] = b"pg_stat\0"; pub const PGSTAT_STAT_PERMANENT_FILENAME: &[u8; 20usize] = b"pg_stat/global.stat\0"; @@ -15047,13 +15054,6 @@ pub struct varattrib_1b_e { pub va_tag: uint8, pub va_data: __IncompleteArrayField<::std::os::raw::c_char>, } -pub type Datum = usize; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct NullableDatum { - pub value: Datum, - pub isnull: bool, -} pub type AttrNumber = int16; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -19322,7 +19322,6 @@ impl Default for FmgrInfo { } } #[repr(C)] -#[derive(Debug)] pub struct FunctionCallInfoBaseData { pub flinfo: *mut FmgrInfo, pub context: fmNodePtr, @@ -20955,13 +20954,21 @@ pub unsafe fn pairingheap_remove(arg_heap: *mut pairingheap, arg_node: *mut pair }) } #[repr(C)] -#[derive(Debug, Default, Copy, Clone)] pub struct ParamExternData { pub value: Datum, pub isnull: bool, pub pflags: uint16, pub ptype: Oid, } +impl Default for ParamExternData { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} pub type ParamListInfo = *mut ParamListInfoData; pub type ParamFetchHook = ::std::option::Option< unsafe extern "C" fn( @@ -20984,7 +20991,6 @@ pub type ParserSetupHook = ::std::option::Option< unsafe extern "C" fn(pstate: *mut ParseState, arg: *mut ::std::os::raw::c_void), >; #[repr(C)] -#[derive(Debug)] pub struct ParamListInfoData { pub paramFetch: ParamFetchHook, pub paramFetchArg: *mut ::std::os::raw::c_void, @@ -21006,7 +21012,6 @@ impl Default for ParamListInfoData { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ParamExecData { pub execPlan: *mut ::std::os::raw::c_void, pub value: Datum, @@ -21259,7 +21264,6 @@ impl Default for Var { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct Const { pub xpr: Expr, pub consttype: Oid, @@ -26902,7 +26906,6 @@ pub type ExprStateEvalFunc = ::std::option::Option< ) -> Datum, >; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprState { pub tag: NodeTag, pub flags: uint8, @@ -26969,7 +26972,6 @@ impl Default for IndexInfo { } pub type ExprContextCallbackFunction = ::std::option::Option; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext_CB { pub next: *mut ExprContext_CB, pub function: ExprContextCallbackFunction, @@ -26985,7 +26987,6 @@ impl Default for ExprContext_CB { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext { pub type_: NodeTag, pub ecxt_scantuple: *mut TupleTableSlot, @@ -27044,7 +27045,6 @@ impl Default for ReturnSetInfo { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ProjectionInfo { pub type_: NodeTag, pub pi_state: ExprState, @@ -27567,7 +27567,6 @@ impl Default for SetExprState { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct SubPlanState { pub type_: NodeTag, pub subplan: *mut SubPlan, @@ -28707,7 +28706,6 @@ pub struct WindowStatePerAggData { } pub type WindowStatePerAgg = *mut WindowStatePerAggData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct WindowAggState { pub ss: ScanState, pub funcs: *mut List, @@ -39915,6 +39913,7 @@ pub struct PGPROC { pub waitLockMode: LOCKMODE, pub heldLocks: LOCKMASK, pub delayChkpt: bool, + pub delayChkptEnd: bool, pub waitLSN: XLogRecPtr, pub syncRepState: ::std::os::raw::c_int, pub syncRepLinks: SHM_QUEUE, @@ -40949,6 +40948,7 @@ pub const WaitEventTimeout_WAIT_EVENT_RECOVERY_APPLY_DELAY: WaitEventTimeout = 1 pub const WaitEventTimeout_WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL: WaitEventTimeout = 150994947; pub const WaitEventTimeout_WAIT_EVENT_VACUUM_DELAY: WaitEventTimeout = 150994948; +pub const WaitEventTimeout_WAIT_EVENT_REGISTER_SYNC_REQUEST: WaitEventTimeout = 150994949; pub type WaitEventTimeout = ::std::os::raw::c_uint; pub const WaitEventIO_WAIT_EVENT_BUFFILE_READ: WaitEventIO = 167772160; pub const WaitEventIO_WAIT_EVENT_BUFFILE_WRITE: WaitEventIO = 167772161; @@ -41846,7 +41846,6 @@ pub unsafe fn pgstat_slru_index(arg_name: *const ::std::os::raw::c_char) -> ::st }) } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ScanKeyData { pub sk_flags: ::std::os::raw::c_int, pub sk_attno: AttrNumber, @@ -43760,7 +43759,6 @@ pub struct GISTPageOpaqueData { } pub type GISTPageOpaque = *mut GISTPageOpaqueData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GIST_SPLITVEC { pub spl_left: *mut OffsetNumber, pub spl_nleft: ::std::os::raw::c_int, @@ -43781,7 +43779,6 @@ impl Default for GIST_SPLITVEC { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GISTENTRY { pub key: Datum, pub rel: Relation, @@ -43804,7 +43801,6 @@ pub struct GISTDeletedPageContents { pub deleteXid: FullTransactionId, } #[repr(C)] -#[derive(Debug)] pub struct GistEntryVector { pub n: int32, pub vector: __IncompleteArrayField, @@ -47930,6 +47926,32 @@ pub unsafe fn heap_fetch( heap_fetch(arg_relation, arg_snapshot, arg_tuple, arg_userbuf) }) } +pub unsafe fn heap_fetch_extended( + arg_relation: Relation, + arg_snapshot: Snapshot, + arg_tuple: HeapTuple, + arg_userbuf: *mut Buffer, + arg_keep_buf: bool, +) -> bool { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn heap_fetch_extended( + arg_relation: Relation, + arg_snapshot: Snapshot, + arg_tuple: HeapTuple, + arg_userbuf: *mut Buffer, + arg_keep_buf: bool, + ) -> bool; + } + heap_fetch_extended( + arg_relation, + arg_snapshot, + arg_tuple, + arg_userbuf, + arg_keep_buf, + ) + }) +} pub unsafe fn heap_hot_search_buffer( arg_tid: ItemPointer, arg_relation: Relation, @@ -59203,7 +59225,6 @@ pub const BgWorkerStartTime_BgWorkerStart_ConsistentState: BgWorkerStartTime = 1 pub const BgWorkerStartTime_BgWorkerStart_RecoveryFinished: BgWorkerStartTime = 2; pub type BgWorkerStartTime = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct BackgroundWorker { pub bgw_name: [::std::os::raw::c_char; 96usize], pub bgw_type: [::std::os::raw::c_char; 96usize], @@ -73480,6 +73501,18 @@ pub unsafe fn GetVirtualXIDsDelayingChkpt( GetVirtualXIDsDelayingChkpt(arg_nvxids) }) } +pub unsafe fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, +) -> *mut VirtualTransactionId { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, + ) -> *mut VirtualTransactionId; + } + GetVirtualXIDsDelayingChkptEnd(arg_nvxids) + }) +} pub unsafe fn HaveVirtualXIDsDelayingChkpt( arg_vxids: *mut VirtualTransactionId, arg_nvxids: ::std::os::raw::c_int, @@ -73494,6 +73527,20 @@ pub unsafe fn HaveVirtualXIDsDelayingChkpt( HaveVirtualXIDsDelayingChkpt(arg_vxids, arg_nvxids) }) } +pub unsafe fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, +) -> bool { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, + ) -> bool; + } + HaveVirtualXIDsDelayingChkptEnd(arg_vxids, arg_nvxids) + }) +} pub unsafe fn BackendPidGetProc(arg_pid: ::std::os::raw::c_int) -> *mut PGPROC { crate::submodules::setjmp::pg_guard_ffi_boundary(move || { extern "C" { @@ -97313,21 +97360,20 @@ pub const jbvType_jbvBinary: jbvType = 18; pub const jbvType_jbvDatetime: jbvType = 32; pub type jbvType = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Copy, Clone)] pub struct JsonbValue { pub type_: jbvType, pub val: JsonbValue__bindgen_ty_1, } #[repr(C)] -#[derive(Copy, Clone)] -pub union JsonbValue__bindgen_ty_1 { - pub numeric: Numeric, - pub boolean: bool, - pub string: JsonbValue__bindgen_ty_1__bindgen_ty_1, - pub array: JsonbValue__bindgen_ty_1__bindgen_ty_2, - pub object: JsonbValue__bindgen_ty_1__bindgen_ty_3, - pub binary: JsonbValue__bindgen_ty_1__bindgen_ty_4, - pub datetime: JsonbValue__bindgen_ty_1__bindgen_ty_5, +pub struct JsonbValue__bindgen_ty_1 { + pub numeric: __BindgenUnionField, + pub boolean: __BindgenUnionField, + pub string: __BindgenUnionField, + pub array: __BindgenUnionField, + pub object: __BindgenUnionField, + pub binary: __BindgenUnionField, + pub datetime: __BindgenUnionField, + pub bindgen_union_field: [u64; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -97391,13 +97437,21 @@ impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_4 { } } #[repr(C)] -#[derive(Debug, Default, Copy, Clone)] pub struct JsonbValue__bindgen_ty_1__bindgen_ty_5 { pub value: Datum, pub typid: Oid, pub typmod: int32, pub tz: ::std::os::raw::c_int, } +impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_5 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} impl Default for JsonbValue__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -97417,7 +97471,6 @@ impl Default for JsonbValue { } } #[repr(C)] -#[derive(Copy, Clone)] pub struct JsonbPair { pub key: JsonbValue, pub value: JsonbValue, @@ -97433,7 +97486,6 @@ impl Default for JsonbPair { } } #[repr(C)] -#[derive(Copy, Clone)] pub struct JsonbParseState { pub contVal: JsonbValue, pub size: Size, diff --git a/pgx-pg-sys/src/pg14.rs b/pgx-pg-sys/src/pg14.rs index c181e5c15..ce09c2961 100644 --- a/pgx-pg-sys/src/pg14.rs +++ b/pgx-pg-sys/src/pg14.rs @@ -1,5 +1,7 @@ use crate as pg_sys; -use crate::PgNode; +#[cfg(any(feature = "pg12", feature = "pg13", feature = "pg14"))] +use crate::NullableDatum; +use crate::{Datum, PgNode}; #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit { @@ -177,7 +179,7 @@ pub const ALIGNOF_LONG: u32 = 8; pub const ALIGNOF_PG_INT128_TYPE: u32 = 16; pub const ALIGNOF_SHORT: u32 = 2; pub const BLCKSZ: u32 = 8192; -pub const CONFIGURE_ARGS : & [u8 ; 106usize] = b" '--prefix=/home/atelier/.pgx/14.2/pgx-install' '--with-pgport=28814' '--enable-debug' '--enable-cassert'\0" ; +pub const CONFIGURE_ARGS : & [u8 ; 106usize] = b" '--prefix=/home/atelier/.pgx/14.3/pgx-install' '--with-pgport=28814' '--enable-debug' '--enable-cassert'\0" ; pub const DEF_PGPORT: u32 = 28814; pub const DEF_PGPORT_STR: &[u8; 6usize] = b"28814\0"; pub const ENABLE_THREAD_SAFETY: u32 = 1; @@ -293,6 +295,7 @@ pub const HAVE_SYS_RESOURCE_H: u32 = 1; pub const HAVE_SYS_SELECT_H: u32 = 1; pub const HAVE_SYS_SEM_H: u32 = 1; pub const HAVE_SYS_SHM_H: u32 = 1; +pub const HAVE_SYS_SIGNALFD_H: u32 = 1; pub const HAVE_SYS_STAT_H: u32 = 1; pub const HAVE_SYS_TYPES_H: u32 = 1; pub const HAVE_SYS_UIO_H: u32 = 1; @@ -312,6 +315,7 @@ pub const HAVE__BUILTIN_BSWAP64: u32 = 1; pub const HAVE__BUILTIN_CLZ: u32 = 1; pub const HAVE__BUILTIN_CONSTANT_P: u32 = 1; pub const HAVE__BUILTIN_CTZ: u32 = 1; +pub const HAVE__BUILTIN_FRAME_ADDRESS: u32 = 1; pub const HAVE__BUILTIN_OP_OVERFLOW: u32 = 1; pub const HAVE__BUILTIN_POPCOUNT: u32 = 1; pub const HAVE__BUILTIN_TYPES_COMPATIBLE_P: u32 = 1; @@ -323,19 +327,19 @@ pub const MAXIMUM_ALIGNOF: u32 = 8; pub const MEMSET_LOOP_LIMIT: u32 = 1024; pub const PACKAGE_BUGREPORT: &[u8; 32usize] = b"pgsql-bugs@lists.postgresql.org\0"; pub const PACKAGE_NAME: &[u8; 11usize] = b"PostgreSQL\0"; -pub const PACKAGE_STRING: &[u8; 16usize] = b"PostgreSQL 14.2\0"; +pub const PACKAGE_STRING: &[u8; 16usize] = b"PostgreSQL 14.3\0"; pub const PACKAGE_TARNAME: &[u8; 11usize] = b"postgresql\0"; pub const PACKAGE_URL: &[u8; 28usize] = b"https://www.postgresql.org/\0"; -pub const PACKAGE_VERSION: &[u8; 5usize] = b"14.2\0"; +pub const PACKAGE_VERSION: &[u8; 5usize] = b"14.3\0"; pub const PG_KRB_SRVNAM: &[u8; 9usize] = b"postgres\0"; pub const PG_MAJORVERSION: &[u8; 3usize] = b"14\0"; pub const PG_MAJORVERSION_NUM: u32 = 14; -pub const PG_MINORVERSION_NUM: u32 = 2; +pub const PG_MINORVERSION_NUM: u32 = 3; pub const PG_USE_STDBOOL: u32 = 1; -pub const PG_VERSION: &[u8; 5usize] = b"14.2\0"; -pub const PG_VERSION_NUM: u32 = 140002; +pub const PG_VERSION: &[u8; 5usize] = b"14.3\0"; +pub const PG_VERSION_NUM: u32 = 140003; pub const PG_VERSION_STR: &[u8; 77usize] = - b"PostgreSQL 14.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.2.0, 64-bit\0"; + b"PostgreSQL 14.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 12.1.0, 64-bit\0"; pub const RELSEG_SIZE: u32 = 131072; pub const SIZEOF_BOOL: u32 = 1; pub const SIZEOF_LONG: u32 = 8; @@ -901,6 +905,8 @@ pub const SOL_NFC: u32 = 280; pub const SOL_KCM: u32 = 281; pub const SOL_TLS: u32 = 282; pub const SOL_XDP: u32 = 283; +pub const SOL_MPTCP: u32 = 284; +pub const SOL_MCTP: u32 = 285; pub const SOMAXCONN: u32 = 4096; pub const _BITS_SOCKADDR_H: u32 = 1; pub const _SS_SIZE: u32 = 128; @@ -1183,7 +1189,7 @@ pub const NI_DGRAM: u32 = 16; pub const _PWD_H: u32 = 1; pub const NSS_BUFLEN_PASSWD: u32 = 1024; pub const PGINVALID_SOCKET: i32 = -1; -pub const PG_BACKEND_VERSIONSTR: &[u8; 28usize] = b"postgres (PostgreSQL) 14.2\n\0"; +pub const PG_BACKEND_VERSIONSTR: &[u8; 28usize] = b"postgres (PostgreSQL) 14.3\n\0"; pub const EXE: &[u8; 1usize] = b"\0"; pub const DEVNULL: &[u8; 10usize] = b"/dev/null\0"; pub const USE_REPL_SNPRINTF: u32 = 1; @@ -2913,6 +2919,8 @@ pub const PROC_VACUUM_STATE_MASK: u32 = 14; pub const PROC_COPYABLE_FLAGS: u32 = 6; pub const FP_LOCK_SLOTS_PER_BACKEND: u32 = 16; pub const INVALID_PGPROCNO: u32 = 2147483647; +pub const DELAY_CHKPT_START: u32 = 1; +pub const DELAY_CHKPT_COMPLETE: u32 = 2; pub const NUM_AUXILIARY_PROCS: u32 = 5; pub const HAVE_PLANNERINFO_TYPEDEF: u32 = 1; pub const AMFLAG_HAS_TID_RANGE: u32 = 1; @@ -15213,13 +15221,6 @@ pub struct varattrib_1b_e { pub va_tag: uint8, pub va_data: __IncompleteArrayField<::std::os::raw::c_char>, } -pub type Datum = usize; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct NullableDatum { - pub value: Datum, - pub isnull: bool, -} pub type AttrNumber = int16; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -19576,7 +19577,6 @@ impl Default for FmgrInfo { } } #[repr(C)] -#[derive(Debug)] pub struct FunctionCallInfoBaseData { pub flinfo: *mut FmgrInfo, pub context: fmNodePtr, @@ -21335,13 +21335,21 @@ pub unsafe fn pairingheap_remove(arg_heap: *mut pairingheap, arg_node: *mut pair }) } #[repr(C)] -#[derive(Debug, Default, Copy, Clone)] pub struct ParamExternData { pub value: Datum, pub isnull: bool, pub pflags: uint16, pub ptype: Oid, } +impl Default for ParamExternData { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} pub type ParamListInfo = *mut ParamListInfoData; pub type ParamFetchHook = ::std::option::Option< unsafe extern "C" fn( @@ -21364,7 +21372,6 @@ pub type ParserSetupHook = ::std::option::Option< unsafe extern "C" fn(pstate: *mut ParseState, arg: *mut ::std::os::raw::c_void), >; #[repr(C)] -#[derive(Debug)] pub struct ParamListInfoData { pub paramFetch: ParamFetchHook, pub paramFetchArg: *mut ::std::os::raw::c_void, @@ -21386,7 +21393,6 @@ impl Default for ParamListInfoData { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ParamExecData { pub execPlan: *mut ::std::os::raw::c_void, pub value: Datum, @@ -21639,7 +21645,6 @@ impl Default for Var { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct Const { pub xpr: Expr, pub consttype: Oid, @@ -27482,7 +27487,6 @@ pub type ExprStateEvalFunc = ::std::option::Option< ) -> Datum, >; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprState { pub tag: NodeTag, pub flags: uint8, @@ -27549,7 +27553,6 @@ impl Default for IndexInfo { } pub type ExprContextCallbackFunction = ::std::option::Option; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext_CB { pub next: *mut ExprContext_CB, pub function: ExprContextCallbackFunction, @@ -27565,7 +27568,6 @@ impl Default for ExprContext_CB { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ExprContext { pub type_: NodeTag, pub ecxt_scantuple: *mut TupleTableSlot, @@ -27624,7 +27626,6 @@ impl Default for ReturnSetInfo { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ProjectionInfo { pub type_: NodeTag, pub pi_state: ExprState, @@ -28171,7 +28172,6 @@ impl Default for SetExprState { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct SubPlanState { pub type_: NodeTag, pub subplan: *mut SubPlan, @@ -29389,7 +29389,6 @@ pub struct WindowStatePerAggData { } pub type WindowStatePerAgg = *mut WindowStatePerAggData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct WindowAggState { pub ss: ScanState, pub funcs: *mut List, @@ -38899,6 +38898,8 @@ pub const WaitEventTimeout_WAIT_EVENT_RECOVERY_APPLY_DELAY: WaitEventTimeout = 1 pub const WaitEventTimeout_WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL: WaitEventTimeout = 150994947; pub const WaitEventTimeout_WAIT_EVENT_VACUUM_DELAY: WaitEventTimeout = 150994948; +pub const WaitEventTimeout_WAIT_EVENT_CHECKPOINT_WRITE_DELAY: WaitEventTimeout = 150994949; +pub const WaitEventTimeout_WAIT_EVENT_REGISTER_SYNC_REQUEST: WaitEventTimeout = 150994950; pub type WaitEventTimeout = ::std::os::raw::c_uint; pub const WaitEventIO_WAIT_EVENT_BASEBACKUP_READ: WaitEventIO = 167772160; pub const WaitEventIO_WAIT_EVENT_BUFFILE_READ: WaitEventIO = 167772161; @@ -40438,7 +40439,6 @@ pub unsafe fn pgstat_slru_index(arg_name: *const ::std::os::raw::c_char) -> ::st }) } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct ScanKeyData { pub sk_flags: ::std::os::raw::c_int, pub sk_attno: AttrNumber, @@ -42919,7 +42919,6 @@ pub struct GISTPageOpaqueData { } pub type GISTPageOpaque = *mut GISTPageOpaqueData; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GIST_SPLITVEC { pub spl_left: *mut OffsetNumber, pub spl_nleft: ::std::os::raw::c_int, @@ -42940,7 +42939,6 @@ impl Default for GIST_SPLITVEC { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct GISTENTRY { pub key: Datum, pub rel: Relation, @@ -42963,7 +42961,6 @@ pub struct GISTDeletedPageContents { pub deleteXid: FullTransactionId, } #[repr(C)] -#[derive(Debug)] pub struct GistEntryVector { pub n: int32, pub vector: __IncompleteArrayField, @@ -48557,6 +48554,32 @@ pub unsafe fn heap_fetch( heap_fetch(arg_relation, arg_snapshot, arg_tuple, arg_userbuf) }) } +pub unsafe fn heap_fetch_extended( + arg_relation: Relation, + arg_snapshot: Snapshot, + arg_tuple: HeapTuple, + arg_userbuf: *mut Buffer, + arg_keep_buf: bool, +) -> bool { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn heap_fetch_extended( + arg_relation: Relation, + arg_snapshot: Snapshot, + arg_tuple: HeapTuple, + arg_userbuf: *mut Buffer, + arg_keep_buf: bool, + ) -> bool; + } + heap_fetch_extended( + arg_relation, + arg_snapshot, + arg_tuple, + arg_userbuf, + arg_keep_buf, + ) + }) +} pub unsafe fn heap_hot_search_buffer( arg_tid: ItemPointer, arg_relation: Relation, @@ -59251,7 +59274,6 @@ pub const BgWorkerStartTime_BgWorkerStart_ConsistentState: BgWorkerStartTime = 1 pub const BgWorkerStartTime_BgWorkerStart_RecoveryFinished: BgWorkerStartTime = 2; pub type BgWorkerStartTime = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct BackgroundWorker { pub bgw_name: [::std::os::raw::c_char; 96usize], pub bgw_type: [::std::os::raw::c_char; 96usize], @@ -60000,6 +60022,7 @@ pub struct PGPROC { pub waitStart: pg_atomic_uint64, pub delayChkpt: bool, pub statusFlags: uint8, + pub delayChkptEnd: bool, pub waitLSN: XLogRecPtr, pub syncRepState: ::std::os::raw::c_int, pub syncRepLinks: SHM_QUEUE, @@ -62112,7 +62135,6 @@ impl Default for AggInfo { } } #[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct AggTransInfo { pub args: *mut List, pub aggfilter: *mut Expr, @@ -75244,6 +75266,18 @@ pub unsafe fn GetVirtualXIDsDelayingChkpt( GetVirtualXIDsDelayingChkpt(arg_nvxids) }) } +pub unsafe fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, +) -> *mut VirtualTransactionId { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn GetVirtualXIDsDelayingChkptEnd( + arg_nvxids: *mut ::std::os::raw::c_int, + ) -> *mut VirtualTransactionId; + } + GetVirtualXIDsDelayingChkptEnd(arg_nvxids) + }) +} pub unsafe fn HaveVirtualXIDsDelayingChkpt( arg_vxids: *mut VirtualTransactionId, arg_nvxids: ::std::os::raw::c_int, @@ -75258,6 +75292,20 @@ pub unsafe fn HaveVirtualXIDsDelayingChkpt( HaveVirtualXIDsDelayingChkpt(arg_vxids, arg_nvxids) }) } +pub unsafe fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, +) -> bool { + crate::submodules::setjmp::pg_guard_ffi_boundary(move || { + extern "C" { + fn HaveVirtualXIDsDelayingChkptEnd( + arg_vxids: *mut VirtualTransactionId, + arg_nvxids: ::std::os::raw::c_int, + ) -> bool; + } + HaveVirtualXIDsDelayingChkptEnd(arg_vxids, arg_nvxids) + }) +} pub unsafe fn BackendPidGetProc(arg_pid: ::std::os::raw::c_int) -> *mut PGPROC { crate::submodules::setjmp::pg_guard_ffi_boundary(move || { extern "C" { @@ -100815,21 +100863,20 @@ pub const jbvType_jbvBinary: jbvType = 18; pub const jbvType_jbvDatetime: jbvType = 32; pub type jbvType = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Copy, Clone)] pub struct JsonbValue { pub type_: jbvType, pub val: JsonbValue__bindgen_ty_1, } #[repr(C)] -#[derive(Copy, Clone)] -pub union JsonbValue__bindgen_ty_1 { - pub numeric: Numeric, - pub boolean: bool, - pub string: JsonbValue__bindgen_ty_1__bindgen_ty_1, - pub array: JsonbValue__bindgen_ty_1__bindgen_ty_2, - pub object: JsonbValue__bindgen_ty_1__bindgen_ty_3, - pub binary: JsonbValue__bindgen_ty_1__bindgen_ty_4, - pub datetime: JsonbValue__bindgen_ty_1__bindgen_ty_5, +pub struct JsonbValue__bindgen_ty_1 { + pub numeric: __BindgenUnionField, + pub boolean: __BindgenUnionField, + pub string: __BindgenUnionField, + pub array: __BindgenUnionField, + pub object: __BindgenUnionField, + pub binary: __BindgenUnionField, + pub datetime: __BindgenUnionField, + pub bindgen_union_field: [u64; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -100893,13 +100940,21 @@ impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_4 { } } #[repr(C)] -#[derive(Debug, Default, Copy, Clone)] pub struct JsonbValue__bindgen_ty_1__bindgen_ty_5 { pub value: Datum, pub typid: Oid, pub typmod: int32, pub tz: ::std::os::raw::c_int, } +impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_5 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} impl Default for JsonbValue__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -100919,7 +100974,6 @@ impl Default for JsonbValue { } } #[repr(C)] -#[derive(Copy, Clone)] pub struct JsonbPair { pub key: JsonbValue, pub value: JsonbValue, @@ -100935,7 +100989,6 @@ impl Default for JsonbPair { } } #[repr(C)] -#[derive(Copy, Clone)] pub struct JsonbParseState { pub contVal: JsonbValue, pub size: Size, diff --git a/pgx-tests/Cargo.toml b/pgx-tests/Cargo.toml index 91ce60441..c4844de7d 100644 --- a/pgx-tests/Cargo.toml +++ b/pgx-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx-tests" -version = "0.4.5" +version = "0.5.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Test framework for 'pgx'-based Postgres extensions" @@ -35,9 +35,9 @@ rustdoc-args = ["--cfg", "docsrs"] owo-colors = "3.4.0" once_cell = "1.10.0" libc = "0.2.126" -pgx = { path = "../pgx", default-features = false, version= "=0.4.5" } -pgx-macros = { path = "../pgx-macros", version= "=0.4.5" } -pgx-utils = { path = "../pgx-utils", version= "=0.4.5" } +pgx = { path = "../pgx", default-features = false, version= "=0.5.0-beta.0" } +pgx-macros = { path = "../pgx-macros", version= "=0.5.0-beta.0" } +pgx-utils = { path = "../pgx-utils", version= "=0.5.0-beta.0" } postgres = "0.19.3" regex = "1.5.5" serde = "1.0.137" diff --git a/pgx-utils/Cargo.toml b/pgx-utils/Cargo.toml index 4a65c46d9..98bba2b6f 100644 --- a/pgx-utils/Cargo.toml +++ b/pgx-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx-utils" -version = "0.4.5" +version = "0.5.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "Utility functions for 'pgx'" diff --git a/pgx/Cargo.toml b/pgx/Cargo.toml index fea7ae89b..1dc62067f 100644 --- a/pgx/Cargo.toml +++ b/pgx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgx" -version = "0.4.5" +version = "0.5.0-beta.0" authors = ["ZomboDB, LLC "] license = "MIT" description = "pgx: A Rust framework for creating Postgres extensions" @@ -36,9 +36,9 @@ cstr_core = "0.2.5" enum-primitive-derive = "0.2.2" num-traits = "0.2.15" seahash = "4.1.0" -pgx-macros = { path = "../pgx-macros/", version = "=0.4.5" } -pgx-pg-sys = { path = "../pgx-pg-sys", version = "=0.4.5" } -pgx-utils = { path = "../pgx-utils/", version = "=0.4.5" } +pgx-macros = { path = "../pgx-macros/", version = "=0.5.0-beta.0" } +pgx-pg-sys = { path = "../pgx-pg-sys", version = "=0.5.0-beta.0" } +pgx-utils = { path = "../pgx-utils/", version = "=0.5.0-beta.0" } serde = { version = "1.0.137", features = [ "derive" ] } serde_cbor = "0.11.2" serde_json = "1.0.81"