diff --git a/pgx-pg-sys/src/pg10.rs b/pgx-pg-sys/src/pg10.rs index c50abbef4..29c309e6e 100644 --- a/pgx-pg-sys/src/pg10.rs +++ b/pgx-pg-sys/src/pg10.rs @@ -374,8 +374,8 @@ pub const PG_CACHE_LINE_SIZE: u32 = 128; pub const TRACE_SORT: u32 = 1; pub const __darwin__: u32 = 1; pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 0; -pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1; +pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_UNIX03: u32 = 1; pub const __DARWIN_64_BIT_INO_T: u32 = 1; pub const __DARWIN_VERS_1050: u32 = 1; @@ -420,9 +420,13 @@ pub const __MAC_10_13_4: u32 = 101304; pub const __MAC_10_14: u32 = 101400; pub const __MAC_10_14_1: u32 = 101401; pub const __MAC_10_14_4: u32 = 101404; +pub const __MAC_10_14_6: u32 = 101406; pub const __MAC_10_15: u32 = 101500; pub const __MAC_10_15_1: u32 = 101501; pub const __MAC_10_15_4: u32 = 101504; +pub const __MAC_10_16: u32 = 101600; +pub const __MAC_11_0: u32 = 110000; +pub const __MAC_11_1: u32 = 110100; pub const __IPHONE_2_0: u32 = 20000; pub const __IPHONE_2_1: u32 = 20100; pub const __IPHONE_2_2: u32 = 20200; @@ -461,6 +465,7 @@ pub const __IPHONE_12_0: u32 = 120000; pub const __IPHONE_12_1: u32 = 120100; pub const __IPHONE_12_2: u32 = 120200; pub const __IPHONE_12_3: u32 = 120300; +pub const __IPHONE_12_4: u32 = 120400; pub const __IPHONE_13_0: u32 = 130000; pub const __IPHONE_13_1: u32 = 130100; pub const __IPHONE_13_2: u32 = 130200; @@ -468,6 +473,11 @@ pub const __IPHONE_13_3: u32 = 130300; pub const __IPHONE_13_4: u32 = 130400; pub const __IPHONE_13_5: u32 = 130500; pub const __IPHONE_13_6: u32 = 130600; +pub const __IPHONE_13_7: u32 = 130700; +pub const __IPHONE_14_0: u32 = 140000; +pub const __IPHONE_14_1: u32 = 140100; +pub const __IPHONE_14_2: u32 = 140200; +pub const __IPHONE_14_3: u32 = 140300; pub const __TVOS_9_0: u32 = 90000; pub const __TVOS_9_1: u32 = 90100; pub const __TVOS_9_2: u32 = 90200; @@ -484,10 +494,15 @@ pub const __TVOS_12_0: u32 = 120000; pub const __TVOS_12_1: u32 = 120100; pub const __TVOS_12_2: u32 = 120200; pub const __TVOS_12_3: u32 = 120300; +pub const __TVOS_12_4: u32 = 120400; pub const __TVOS_13_0: u32 = 130000; pub const __TVOS_13_2: u32 = 130200; pub const __TVOS_13_3: u32 = 130300; pub const __TVOS_13_4: u32 = 130400; +pub const __TVOS_14_0: u32 = 140000; +pub const __TVOS_14_1: u32 = 140100; +pub const __TVOS_14_2: u32 = 140200; +pub const __TVOS_14_3: u32 = 140300; pub const __WATCHOS_1_0: u32 = 10000; pub const __WATCHOS_2_0: u32 = 20000; pub const __WATCHOS_2_1: u32 = 20100; @@ -503,11 +518,49 @@ pub const __WATCHOS_4_3: u32 = 40300; pub const __WATCHOS_5_0: u32 = 50000; pub const __WATCHOS_5_1: u32 = 50100; pub const __WATCHOS_5_2: u32 = 50200; +pub const __WATCHOS_5_3: u32 = 50300; pub const __WATCHOS_6_0: u32 = 60000; pub const __WATCHOS_6_1: u32 = 60100; pub const __WATCHOS_6_2: u32 = 60200; +pub const __WATCHOS_7_0: u32 = 70000; +pub const __WATCHOS_7_1: u32 = 70100; +pub const __WATCHOS_7_2: u32 = 70200; +pub const MAC_OS_X_VERSION_10_0: u32 = 1000; +pub const MAC_OS_X_VERSION_10_1: u32 = 1010; +pub const MAC_OS_X_VERSION_10_2: u32 = 1020; +pub const MAC_OS_X_VERSION_10_3: u32 = 1030; +pub const MAC_OS_X_VERSION_10_4: u32 = 1040; +pub const MAC_OS_X_VERSION_10_5: u32 = 1050; +pub const MAC_OS_X_VERSION_10_6: u32 = 1060; +pub const MAC_OS_X_VERSION_10_7: u32 = 1070; +pub const MAC_OS_X_VERSION_10_8: u32 = 1080; +pub const MAC_OS_X_VERSION_10_9: u32 = 1090; +pub const MAC_OS_X_VERSION_10_10: u32 = 101000; +pub const MAC_OS_X_VERSION_10_10_2: u32 = 101002; +pub const MAC_OS_X_VERSION_10_10_3: u32 = 101003; +pub const MAC_OS_X_VERSION_10_11: u32 = 101100; +pub const MAC_OS_X_VERSION_10_11_2: u32 = 101102; +pub const MAC_OS_X_VERSION_10_11_3: u32 = 101103; +pub const MAC_OS_X_VERSION_10_11_4: u32 = 101104; +pub const MAC_OS_X_VERSION_10_12: u32 = 101200; +pub const MAC_OS_X_VERSION_10_12_1: u32 = 101201; +pub const MAC_OS_X_VERSION_10_12_2: u32 = 101202; +pub const MAC_OS_X_VERSION_10_12_4: u32 = 101204; +pub const MAC_OS_X_VERSION_10_13: u32 = 101300; +pub const MAC_OS_X_VERSION_10_13_1: u32 = 101301; +pub const MAC_OS_X_VERSION_10_13_2: u32 = 101302; +pub const MAC_OS_X_VERSION_10_13_4: u32 = 101304; +pub const MAC_OS_X_VERSION_10_14: u32 = 101400; +pub const MAC_OS_X_VERSION_10_14_1: u32 = 101401; +pub const MAC_OS_X_VERSION_10_14_4: u32 = 101404; +pub const MAC_OS_X_VERSION_10_14_6: u32 = 101406; +pub const MAC_OS_X_VERSION_10_15: u32 = 101500; +pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501; +pub const MAC_OS_X_VERSION_10_16: u32 = 101600; +pub const MAC_OS_VERSION_11_0: u32 = 110000; pub const __DRIVERKIT_19_0: u32 = 190000; -pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 101500; +pub const __DRIVERKIT_20_0: u32 = 200000; +pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 110100; pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1; pub const __PTHREAD_SIZE__: u32 = 8176; pub const __PTHREAD_ATTR_SIZE__: u32 = 56; @@ -597,6 +650,9 @@ pub const FP_RND_DOWN: u32 = 1; pub const FP_RND_UP: u32 = 2; pub const FP_CHOP: u32 = 3; pub const FP_STATE_BYTES: u32 = 512; +pub const _X86_INSTRUCTION_STATE_MAX_INSN_BYTES: u32 = 2380; +pub const _X86_INSTRUCTION_STATE_CACHELINE_SIZE: u32 = 64; +pub const __LASTBRANCH_MAX: u32 = 32; pub const SIGEV_NONE: u32 = 0; pub const SIGEV_SIGNAL: u32 = 1; pub const SIGEV_THREAD: u32 = 3; @@ -730,7 +786,9 @@ pub const RUSAGE_INFO_V1: u32 = 1; pub const RUSAGE_INFO_V2: u32 = 2; pub const RUSAGE_INFO_V3: u32 = 3; pub const RUSAGE_INFO_V4: u32 = 4; -pub const RUSAGE_INFO_CURRENT: u32 = 4; +pub const RUSAGE_INFO_V5: u32 = 5; +pub const RUSAGE_INFO_CURRENT: u32 = 5; +pub const RU_PROC_RUNS_RESLIDE: u32 = 1; pub const RLIMIT_CPU: u32 = 0; pub const RLIMIT_FSIZE: u32 = 1; pub const RLIMIT_DATA: u32 = 2; @@ -758,6 +816,8 @@ pub const IOPOL_TYPE_DISK: u32 = 0; pub const IOPOL_TYPE_VFS_ATIME_UPDATES: u32 = 2; pub const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES: u32 = 3; pub const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME: u32 = 4; +pub const IOPOL_TYPE_VFS_TRIGGER_RESOLVE: u32 = 5; +pub const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION: u32 = 6; pub const IOPOL_SCOPE_PROCESS: u32 = 0; pub const IOPOL_SCOPE_THREAD: u32 = 1; pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2; @@ -776,6 +836,10 @@ pub const IOPOL_MATERIALIZE_DATALESS_FILES_OFF: u32 = 1; pub const IOPOL_MATERIALIZE_DATALESS_FILES_ON: u32 = 2; pub const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT: u32 = 0; pub const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME: u32 = 1; +pub const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT: u32 = 0; +pub const IOPOL_VFS_TRIGGER_RESOLVE_OFF: u32 = 1; +pub const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT: u32 = 0; +pub const IOPOL_VFS_CONTENT_PROTECTION_IGNORE: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WCOREFLAG: u32 = 128; @@ -1126,7 +1190,8 @@ pub const pseudo_AF_HDRCMPLT: u32 = 35; pub const AF_RESERVED_36: u32 = 36; pub const AF_IEEE80211: u32 = 37; pub const AF_UTUN: u32 = 38; -pub const AF_MAX: u32 = 40; +pub const AF_VSOCK: u32 = 40; +pub const AF_MAX: u32 = 41; pub const SOCK_MAXADDRLEN: u32 = 255; pub const _SS_MAXSIZE: u32 = 128; pub const PF_UNSPEC: u32 = 0; @@ -1167,8 +1232,9 @@ pub const PF_NETBIOS: u32 = 33; pub const PF_PPP: u32 = 34; pub const PF_RESERVED_36: u32 = 36; pub const PF_UTUN: u32 = 38; -pub const PF_MAX: u32 = 40; -pub const NET_MAXID: u32 = 40; +pub const PF_VSOCK: u32 = 40; +pub const PF_MAX: u32 = 41; +pub const NET_MAXID: u32 = 41; pub const NET_RT_DUMP: u32 = 1; pub const NET_RT_FLAGS: u32 = 2; pub const NET_RT_IFLIST: u32 = 3; @@ -1195,6 +1261,7 @@ pub const MSG_SEND: u32 = 4096; pub const MSG_HAVEMORE: u32 = 8192; pub const MSG_RCVMORE: u32 = 16384; pub const MSG_NEEDSA: u32 = 65536; +pub const MSG_NOSIGNAL: u32 = 524288; pub const SCM_RIGHTS: u32 = 1; pub const SCM_TIMESTAMP: u32 = 2; pub const SCM_CREDS: u32 = 3; @@ -1359,6 +1426,7 @@ pub const IP_BOUND_IF: u32 = 25; pub const IP_PKTINFO: u32 = 26; pub const IP_RECVPKTINFO: u32 = 26; pub const IP_RECVTOS: u32 = 27; +pub const IP_DONTFRAG: u32 = 28; pub const IP_FW_ADD: u32 = 40; pub const IP_FW_DEL: u32 = 41; pub const IP_FW_FLUSH: u32 = 42; @@ -1432,6 +1500,9 @@ pub const __IPV6_ADDR_SCOPE_LINKLOCAL: u32 = 2; pub const __IPV6_ADDR_SCOPE_SITELOCAL: u32 = 5; pub const __IPV6_ADDR_SCOPE_ORGLOCAL: u32 = 8; pub const __IPV6_ADDR_SCOPE_GLOBAL: u32 = 14; +pub const IPV6_ADDR_MC_FLAGS_TRANSIENT: u32 = 16; +pub const IPV6_ADDR_MC_FLAGS_PREFIX: u32 = 32; +pub const IPV6_ADDR_MC_FLAGS_UNICAST_BASED: u32 = 48; pub const IPV6_SOCKOPT_RESERVED1: u32 = 3; pub const IPV6_UNICAST_HOPS: u32 = 4; pub const IPV6_MULTICAST_IF: u32 = 9; @@ -1726,7 +1797,7 @@ pub const SIZE_T_MAX: i32 = -1; pub const UQUAD_MAX: i32 = -1; pub const QUAD_MAX: u64 = 9223372036854775807; pub const QUAD_MIN: i64 = -9223372036854775808; -pub const ARG_MAX: u32 = 262144; +pub const ARG_MAX: u32 = 1048576; pub const CHILD_MAX: u32 = 266; pub const GID_MAX: u32 = 2147483647; pub const LINK_MAX: u32 = 32767; @@ -1855,6 +1926,13 @@ pub const O_NOFOLLOW: u32 = 256; pub const O_CREAT: u32 = 512; pub const O_TRUNC: u32 = 1024; pub const O_EXCL: u32 = 2048; +pub const O_EVTONLY: u32 = 32768; +pub const O_NOCTTY: u32 = 131072; +pub const O_DIRECTORY: u32 = 1048576; +pub const O_SYMLINK: u32 = 2097152; +pub const O_DSYNC: u32 = 4194304; +pub const O_CLOEXEC: u32 = 16777216; +pub const O_NOFOLLOW_ANY: u32 = 536870912; pub const AT_FDCWD: i32 = -2; pub const AT_EACCESS: u32 = 16; pub const AT_SYMLINK_NOFOLLOW: u32 = 32; @@ -1862,12 +1940,6 @@ pub const AT_SYMLINK_FOLLOW: u32 = 64; pub const AT_REMOVEDIR: u32 = 128; pub const AT_REALDEV: u32 = 512; pub const AT_FDONLY: u32 = 1024; -pub const O_EVTONLY: u32 = 32768; -pub const O_NOCTTY: u32 = 131072; -pub const O_DIRECTORY: u32 = 1048576; -pub const O_SYMLINK: u32 = 2097152; -pub const O_DSYNC: u32 = 4194304; -pub const O_CLOEXEC: u32 = 16777216; pub const O_DP_GETRAWENCRYPTED: u32 = 1; pub const O_DP_GETRAWUNENCRYPTED: u32 = 2; pub const FAPPEND: u32 = 8; @@ -1929,6 +2001,9 @@ pub const F_PUNCHHOLE: u32 = 99; pub const F_TRIM_ACTIVE_FILE: u32 = 100; pub const F_SPECULATIVE_READ: u32 = 101; pub const F_GETPATH_NOFIRMLINK: u32 = 102; +pub const F_ADDFILESIGS_INFO: u32 = 103; +pub const F_ADDFILESUPPL: u32 = 104; +pub const F_GETSIGSINFO: u32 = 105; pub const FCNTL_FS_SPECIFIC_BASE: u32 = 65536; pub const F_DUPFD_CLOEXEC: u32 = 67; pub const FD_CLOEXEC: u32 = 1; @@ -1969,6 +2044,8 @@ pub const F_ALLOCATECONTIG: u32 = 2; pub const F_ALLOCATEALL: u32 = 4; pub const F_PEOFPOSMODE: u32 = 3; pub const F_VOLPOSMODE: u32 = 4; +pub const USER_FSIGNATURES_CDHASH_LEN: u32 = 20; +pub const GETSIGSINFO_PLATFORM_BINARY: u32 = 1; pub const LOCK_SH: u32 = 1; pub const LOCK_EX: u32 = 2; pub const LOCK_NB: u32 = 4; @@ -2317,6 +2394,7 @@ pub const LOCAL_PEERPID: u32 = 2; pub const LOCAL_PEEREPID: u32 = 3; pub const LOCAL_PEERUUID: u32 = 4; pub const LOCAL_PEEREUUID: u32 = 5; +pub const LOCAL_PEERTOKEN: u32 = 6; pub const SM_DATABASE: u32 = 64; pub const SM_USER: u32 = 32; pub const SM_DATABASE_USER: u32 = 97; @@ -2391,6 +2469,36 @@ pub const PG_WAIT_IPC: u32 = 134217728; pub const PG_WAIT_TIMEOUT: u32 = 150994944; pub const PG_WAIT_IO: u32 = 167772160; pub const PGSTAT_NUM_PROGRESS_PARAM: u32 = 10; +pub const GIN_COMPARE_PROC: u32 = 1; +pub const GIN_EXTRACTVALUE_PROC: u32 = 2; +pub const GIN_EXTRACTQUERY_PROC: u32 = 3; +pub const GIN_CONSISTENT_PROC: u32 = 4; +pub const GIN_COMPARE_PARTIAL_PROC: u32 = 5; +pub const GIN_TRICONSISTENT_PROC: u32 = 6; +pub const GINNProcs: u32 = 6; +pub const GIN_SEARCH_MODE_DEFAULT: u32 = 0; +pub const GIN_SEARCH_MODE_INCLUDE_EMPTY: u32 = 1; +pub const GIN_SEARCH_MODE_ALL: u32 = 2; +pub const GIN_SEARCH_MODE_EVERYTHING: u32 = 3; +pub const GIN_FALSE: u32 = 0; +pub const GIN_TRUE: u32 = 1; +pub const GIN_MAYBE: u32 = 2; +pub const GIST_CONSISTENT_PROC: u32 = 1; +pub const GIST_UNION_PROC: u32 = 2; +pub const GIST_COMPRESS_PROC: u32 = 3; +pub const GIST_DECOMPRESS_PROC: u32 = 4; +pub const GIST_PENALTY_PROC: u32 = 5; +pub const GIST_PICKSPLIT_PROC: u32 = 6; +pub const GIST_EQUAL_PROC: u32 = 7; +pub const GIST_DISTANCE_PROC: u32 = 8; +pub const GIST_FETCH_PROC: u32 = 9; +pub const GISTNProcs: u32 = 9; +pub const F_LEAF: u32 = 1; +pub const F_DELETED: u32 = 2; +pub const F_TUPLES_DELETED: u32 = 4; +pub const F_FOLLOW_RIGHT: u32 = 8; +pub const F_HAS_GARBAGE: u32 = 16; +pub const GIST_PAGE_ID: u32 = 65409; pub const FirstBootstrapObjectId: u32 = 10000; pub const FirstNormalObjectId: u32 = 16384; pub const MaxTupleAttributeNumber: u32 = 1664; @@ -4516,6 +4624,182 @@ pub struct __darwin_x86_debug_state32 { pub __dr7: ::std::os::raw::c_uint, } #[repr(C)] +#[derive(Copy, Clone)] +pub struct __x86_instruction_state { + pub __insn_stream_valid_bytes: ::std::os::raw::c_int, + pub __insn_offset: ::std::os::raw::c_int, + pub __out_of_synch: ::std::os::raw::c_int, + pub __insn_bytes: [__uint8_t; 2380usize], + pub __insn_cacheline: [__uint8_t; 64usize], +} +impl Default for __x86_instruction_state { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __last_branch_record { + pub __from_ip: __uint64_t, + pub __to_ip: __uint64_t, + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_padding_0: u32, +} +impl __last_branch_record { + #[inline] + pub fn __mispredict(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___mispredict(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn __tsx_abort(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___tsx_abort(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn __in_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set___in_tsx(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn __cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 16u8) as u32) } + } + #[inline] + pub fn set___cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 16u8, val as u64) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 13u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + __mispredict: __uint32_t, + __tsx_abort: __uint32_t, + __in_tsx: __uint32_t, + __cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __mispredict: u32 = unsafe { ::std::mem::transmute(__mispredict) }; + __mispredict as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __tsx_abort: u32 = unsafe { ::std::mem::transmute(__tsx_abort) }; + __tsx_abort as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let __in_tsx: u32 = unsafe { ::std::mem::transmute(__in_tsx) }; + __in_tsx as u64 + }); + __bindgen_bitfield_unit.set(3usize, 16u8, { + let __cycle_count: u32 = unsafe { ::std::mem::transmute(__cycle_count) }; + __cycle_count as u64 + }); + __bindgen_bitfield_unit.set(19usize, 13u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __last_branch_state { + pub __lbr_count: ::std::os::raw::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __lbrs: [__last_branch_record; 32usize], +} +impl __last_branch_state { + #[inline] + pub fn __lbr_supported_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_tsx(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn __lbr_supported_cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + __lbr_supported_tsx: __uint32_t, + __lbr_supported_cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __lbr_supported_tsx: u32 = unsafe { ::std::mem::transmute(__lbr_supported_tsx) }; + __lbr_supported_tsx as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __lbr_supported_cycle_count: u32 = + unsafe { ::std::mem::transmute(__lbr_supported_cycle_count) }; + __lbr_supported_cycle_count as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct __x86_pagein_state { pub __pagein_error: ::std::os::raw::c_int, @@ -5246,7 +5530,48 @@ pub struct rusage_info_v4 { pub ri_interval_max_phys_footprint: u64, pub ri_runnable_time: u64, } -pub type rusage_info_current = rusage_info_v4; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct rusage_info_v5 { + pub ri_uuid: [u8; 16usize], + pub ri_user_time: u64, + pub ri_system_time: u64, + pub ri_pkg_idle_wkups: u64, + pub ri_interrupt_wkups: u64, + pub ri_pageins: u64, + pub ri_wired_size: u64, + pub ri_resident_size: u64, + pub ri_phys_footprint: u64, + pub ri_proc_start_abstime: u64, + pub ri_proc_exit_abstime: u64, + pub ri_child_user_time: u64, + pub ri_child_system_time: u64, + pub ri_child_pkg_idle_wkups: u64, + pub ri_child_interrupt_wkups: u64, + pub ri_child_pageins: u64, + pub ri_child_elapsed_abstime: u64, + pub ri_diskio_bytesread: u64, + pub ri_diskio_byteswritten: u64, + pub ri_cpu_time_qos_default: u64, + pub ri_cpu_time_qos_maintenance: u64, + pub ri_cpu_time_qos_background: u64, + pub ri_cpu_time_qos_utility: u64, + pub ri_cpu_time_qos_legacy: u64, + pub ri_cpu_time_qos_user_initiated: u64, + pub ri_cpu_time_qos_user_interactive: u64, + pub ri_billed_system_time: u64, + pub ri_serviced_system_time: u64, + pub ri_logical_writes: u64, + pub ri_lifetime_max_phys_footprint: u64, + pub ri_instructions: u64, + pub ri_cycles: u64, + pub ri_billed_energy: u64, + pub ri_serviced_energy: u64, + pub ri_interval_max_phys_footprint: u64, + pub ri_runnable_time: u64, + pub ri_flags: u64, +} +pub type rusage_info_current = rusage_info_v5; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct rlimit { @@ -6191,6 +6516,15 @@ extern "C" { ) -> *mut ::std::os::raw::c_void; } #[pg_guard] +extern "C" { + pub fn strtonum( + __numstr: *const ::std::os::raw::c_char, + __minval: ::std::os::raw::c_longlong, + __maxval: ::std::os::raw::c_longlong, + __errstrp: *mut *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_longlong; +} +#[pg_guard] extern "C" { pub fn strtoq( __str: *const ::std::os::raw::c_char, @@ -6529,6 +6863,14 @@ extern "C" { ) -> ::std::os::raw::c_int; } #[pg_guard] +extern "C" { + pub fn strsignal_r( + __sig: ::std::os::raw::c_int, + __strsignalbuf: *mut ::std::os::raw::c_char, + __buflen: usize, + ) -> ::std::os::raw::c_int; +} +#[pg_guard] extern "C" { pub fn bcmp( arg1: *const ::std::os::raw::c_void, @@ -11536,27 +11878,13 @@ pub struct radvisory { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct fcodeblobs { - pub f_cd_hash: *mut ::std::os::raw::c_void, - pub f_hash_size: usize, - pub f_cd_buffer: *mut ::std::os::raw::c_void, - pub f_cd_size: usize, - pub f_out_size: *mut ::std::os::raw::c_uint, - pub f_arch: ::std::os::raw::c_int, - pub __padding: ::std::os::raw::c_int, -} -impl Default for fcodeblobs { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type fcodeblobs_t = fcodeblobs; -#[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct fsignatures { pub fs_file_start: off_t, pub fs_blob_start: *mut ::std::os::raw::c_void, pub fs_blob_size: usize, + pub fs_fsignatures_size: usize, + pub fs_cdhash: [::std::os::raw::c_char; 20usize], + pub fs_hash_type: ::std::os::raw::c_int, } impl Default for fsignatures { fn default() -> Self { @@ -11565,6 +11893,15 @@ impl Default for fsignatures { } pub type fsignatures_t = fsignatures; #[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct fsupplement { + pub fs_file_start: off_t, + pub fs_blob_start: off_t, + pub fs_blob_size: usize, + pub fs_orig_fd: ::std::os::raw::c_int, +} +pub type fsupplement_t = fsupplement; +#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct fchecklv { pub lv_file_start: off_t, @@ -11579,6 +11916,14 @@ impl Default for fchecklv { pub type fchecklv_t = fchecklv; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] +pub struct fgetsigsinfo { + pub fg_file_start: off_t, + pub fg_info_request: ::std::os::raw::c_int, + pub fg_sig_is_platform: ::std::os::raw::c_int, +} +pub type fgetsigsinfo_t = fgetsigsinfo; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] pub struct fstore { pub fst_flags: ::std::os::raw::c_uint, pub fst_posmode: ::std::os::raw::c_int, @@ -26637,6 +26982,86 @@ extern "C" { } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] +pub struct GinStatsData { + pub nPendingPages: BlockNumber, + pub nTotalPages: BlockNumber, + pub nEntryPages: BlockNumber, + pub nDataPages: BlockNumber, + pub nEntries: int64, + pub ginVersion: int32, +} +pub type GinTernaryValue = ::std::os::raw::c_char; +#[pg_guard] +extern "C" { + pub static mut GinFuzzySearchLimit: ::std::os::raw::c_int; +} +#[pg_guard] +extern "C" { + pub static mut gin_pending_list_limit: ::std::os::raw::c_int; +} +#[pg_guard] +extern "C" { + pub fn ginGetStats(index: Relation, stats: *mut GinStatsData); +} +#[pg_guard] +extern "C" { + pub fn ginUpdateStats(index: Relation, stats: *const GinStatsData); +} +pub type GistNSN = XLogRecPtr; +pub type PageGistNSN = PageXLogRecPtr; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct GISTPageOpaqueData { + pub nsn: PageGistNSN, + pub rightlink: BlockNumber, + pub flags: uint16, + pub gist_page_id: uint16, +} +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, + pub spl_ldatum: Datum, + pub spl_ldatum_exists: bool, + pub spl_right: *mut OffsetNumber, + pub spl_nright: ::std::os::raw::c_int, + pub spl_rdatum: Datum, + pub spl_rdatum_exists: bool, +} +impl Default for GIST_SPLITVEC { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GISTENTRY { + pub key: Datum, + pub rel: Relation, + pub page: Page, + pub offset: OffsetNumber, + pub leafkey: bool, +} +impl Default for GISTENTRY { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug)] +pub struct GistEntryVector { + pub n: int32, + pub vector: __IncompleteArrayField, +} +impl Default for GistEntryVector { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] pub struct VariableCacheData { pub nextOid: Oid, pub oidCount: uint32, diff --git a/pgx-pg-sys/src/pg11.rs b/pgx-pg-sys/src/pg11.rs index f83a19dd2..cae015093 100644 --- a/pgx-pg-sys/src/pg11.rs +++ b/pgx-pg-sys/src/pg11.rs @@ -373,8 +373,8 @@ pub const PG_CACHE_LINE_SIZE: u32 = 128; pub const TRACE_SORT: u32 = 1; pub const __darwin__: u32 = 1; pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 0; -pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1; +pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_UNIX03: u32 = 1; pub const __DARWIN_64_BIT_INO_T: u32 = 1; pub const __DARWIN_VERS_1050: u32 = 1; @@ -419,9 +419,13 @@ pub const __MAC_10_13_4: u32 = 101304; pub const __MAC_10_14: u32 = 101400; pub const __MAC_10_14_1: u32 = 101401; pub const __MAC_10_14_4: u32 = 101404; +pub const __MAC_10_14_6: u32 = 101406; pub const __MAC_10_15: u32 = 101500; pub const __MAC_10_15_1: u32 = 101501; pub const __MAC_10_15_4: u32 = 101504; +pub const __MAC_10_16: u32 = 101600; +pub const __MAC_11_0: u32 = 110000; +pub const __MAC_11_1: u32 = 110100; pub const __IPHONE_2_0: u32 = 20000; pub const __IPHONE_2_1: u32 = 20100; pub const __IPHONE_2_2: u32 = 20200; @@ -460,6 +464,7 @@ pub const __IPHONE_12_0: u32 = 120000; pub const __IPHONE_12_1: u32 = 120100; pub const __IPHONE_12_2: u32 = 120200; pub const __IPHONE_12_3: u32 = 120300; +pub const __IPHONE_12_4: u32 = 120400; pub const __IPHONE_13_0: u32 = 130000; pub const __IPHONE_13_1: u32 = 130100; pub const __IPHONE_13_2: u32 = 130200; @@ -467,6 +472,11 @@ pub const __IPHONE_13_3: u32 = 130300; pub const __IPHONE_13_4: u32 = 130400; pub const __IPHONE_13_5: u32 = 130500; pub const __IPHONE_13_6: u32 = 130600; +pub const __IPHONE_13_7: u32 = 130700; +pub const __IPHONE_14_0: u32 = 140000; +pub const __IPHONE_14_1: u32 = 140100; +pub const __IPHONE_14_2: u32 = 140200; +pub const __IPHONE_14_3: u32 = 140300; pub const __TVOS_9_0: u32 = 90000; pub const __TVOS_9_1: u32 = 90100; pub const __TVOS_9_2: u32 = 90200; @@ -483,10 +493,15 @@ pub const __TVOS_12_0: u32 = 120000; pub const __TVOS_12_1: u32 = 120100; pub const __TVOS_12_2: u32 = 120200; pub const __TVOS_12_3: u32 = 120300; +pub const __TVOS_12_4: u32 = 120400; pub const __TVOS_13_0: u32 = 130000; pub const __TVOS_13_2: u32 = 130200; pub const __TVOS_13_3: u32 = 130300; pub const __TVOS_13_4: u32 = 130400; +pub const __TVOS_14_0: u32 = 140000; +pub const __TVOS_14_1: u32 = 140100; +pub const __TVOS_14_2: u32 = 140200; +pub const __TVOS_14_3: u32 = 140300; pub const __WATCHOS_1_0: u32 = 10000; pub const __WATCHOS_2_0: u32 = 20000; pub const __WATCHOS_2_1: u32 = 20100; @@ -502,11 +517,49 @@ pub const __WATCHOS_4_3: u32 = 40300; pub const __WATCHOS_5_0: u32 = 50000; pub const __WATCHOS_5_1: u32 = 50100; pub const __WATCHOS_5_2: u32 = 50200; +pub const __WATCHOS_5_3: u32 = 50300; pub const __WATCHOS_6_0: u32 = 60000; pub const __WATCHOS_6_1: u32 = 60100; pub const __WATCHOS_6_2: u32 = 60200; +pub const __WATCHOS_7_0: u32 = 70000; +pub const __WATCHOS_7_1: u32 = 70100; +pub const __WATCHOS_7_2: u32 = 70200; +pub const MAC_OS_X_VERSION_10_0: u32 = 1000; +pub const MAC_OS_X_VERSION_10_1: u32 = 1010; +pub const MAC_OS_X_VERSION_10_2: u32 = 1020; +pub const MAC_OS_X_VERSION_10_3: u32 = 1030; +pub const MAC_OS_X_VERSION_10_4: u32 = 1040; +pub const MAC_OS_X_VERSION_10_5: u32 = 1050; +pub const MAC_OS_X_VERSION_10_6: u32 = 1060; +pub const MAC_OS_X_VERSION_10_7: u32 = 1070; +pub const MAC_OS_X_VERSION_10_8: u32 = 1080; +pub const MAC_OS_X_VERSION_10_9: u32 = 1090; +pub const MAC_OS_X_VERSION_10_10: u32 = 101000; +pub const MAC_OS_X_VERSION_10_10_2: u32 = 101002; +pub const MAC_OS_X_VERSION_10_10_3: u32 = 101003; +pub const MAC_OS_X_VERSION_10_11: u32 = 101100; +pub const MAC_OS_X_VERSION_10_11_2: u32 = 101102; +pub const MAC_OS_X_VERSION_10_11_3: u32 = 101103; +pub const MAC_OS_X_VERSION_10_11_4: u32 = 101104; +pub const MAC_OS_X_VERSION_10_12: u32 = 101200; +pub const MAC_OS_X_VERSION_10_12_1: u32 = 101201; +pub const MAC_OS_X_VERSION_10_12_2: u32 = 101202; +pub const MAC_OS_X_VERSION_10_12_4: u32 = 101204; +pub const MAC_OS_X_VERSION_10_13: u32 = 101300; +pub const MAC_OS_X_VERSION_10_13_1: u32 = 101301; +pub const MAC_OS_X_VERSION_10_13_2: u32 = 101302; +pub const MAC_OS_X_VERSION_10_13_4: u32 = 101304; +pub const MAC_OS_X_VERSION_10_14: u32 = 101400; +pub const MAC_OS_X_VERSION_10_14_1: u32 = 101401; +pub const MAC_OS_X_VERSION_10_14_4: u32 = 101404; +pub const MAC_OS_X_VERSION_10_14_6: u32 = 101406; +pub const MAC_OS_X_VERSION_10_15: u32 = 101500; +pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501; +pub const MAC_OS_X_VERSION_10_16: u32 = 101600; +pub const MAC_OS_VERSION_11_0: u32 = 110000; pub const __DRIVERKIT_19_0: u32 = 190000; -pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 101500; +pub const __DRIVERKIT_20_0: u32 = 200000; +pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 110100; pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1; pub const __PTHREAD_SIZE__: u32 = 8176; pub const __PTHREAD_ATTR_SIZE__: u32 = 56; @@ -596,6 +649,9 @@ pub const FP_RND_DOWN: u32 = 1; pub const FP_RND_UP: u32 = 2; pub const FP_CHOP: u32 = 3; pub const FP_STATE_BYTES: u32 = 512; +pub const _X86_INSTRUCTION_STATE_MAX_INSN_BYTES: u32 = 2380; +pub const _X86_INSTRUCTION_STATE_CACHELINE_SIZE: u32 = 64; +pub const __LASTBRANCH_MAX: u32 = 32; pub const SIGEV_NONE: u32 = 0; pub const SIGEV_SIGNAL: u32 = 1; pub const SIGEV_THREAD: u32 = 3; @@ -729,7 +785,9 @@ pub const RUSAGE_INFO_V1: u32 = 1; pub const RUSAGE_INFO_V2: u32 = 2; pub const RUSAGE_INFO_V3: u32 = 3; pub const RUSAGE_INFO_V4: u32 = 4; -pub const RUSAGE_INFO_CURRENT: u32 = 4; +pub const RUSAGE_INFO_V5: u32 = 5; +pub const RUSAGE_INFO_CURRENT: u32 = 5; +pub const RU_PROC_RUNS_RESLIDE: u32 = 1; pub const RLIMIT_CPU: u32 = 0; pub const RLIMIT_FSIZE: u32 = 1; pub const RLIMIT_DATA: u32 = 2; @@ -757,6 +815,8 @@ pub const IOPOL_TYPE_DISK: u32 = 0; pub const IOPOL_TYPE_VFS_ATIME_UPDATES: u32 = 2; pub const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES: u32 = 3; pub const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME: u32 = 4; +pub const IOPOL_TYPE_VFS_TRIGGER_RESOLVE: u32 = 5; +pub const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION: u32 = 6; pub const IOPOL_SCOPE_PROCESS: u32 = 0; pub const IOPOL_SCOPE_THREAD: u32 = 1; pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2; @@ -775,6 +835,10 @@ pub const IOPOL_MATERIALIZE_DATALESS_FILES_OFF: u32 = 1; pub const IOPOL_MATERIALIZE_DATALESS_FILES_ON: u32 = 2; pub const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT: u32 = 0; pub const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME: u32 = 1; +pub const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT: u32 = 0; +pub const IOPOL_VFS_TRIGGER_RESOLVE_OFF: u32 = 1; +pub const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT: u32 = 0; +pub const IOPOL_VFS_CONTENT_PROTECTION_IGNORE: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WCOREFLAG: u32 = 128; @@ -1127,7 +1191,8 @@ pub const pseudo_AF_HDRCMPLT: u32 = 35; pub const AF_RESERVED_36: u32 = 36; pub const AF_IEEE80211: u32 = 37; pub const AF_UTUN: u32 = 38; -pub const AF_MAX: u32 = 40; +pub const AF_VSOCK: u32 = 40; +pub const AF_MAX: u32 = 41; pub const SOCK_MAXADDRLEN: u32 = 255; pub const _SS_MAXSIZE: u32 = 128; pub const PF_UNSPEC: u32 = 0; @@ -1168,8 +1233,9 @@ pub const PF_NETBIOS: u32 = 33; pub const PF_PPP: u32 = 34; pub const PF_RESERVED_36: u32 = 36; pub const PF_UTUN: u32 = 38; -pub const PF_MAX: u32 = 40; -pub const NET_MAXID: u32 = 40; +pub const PF_VSOCK: u32 = 40; +pub const PF_MAX: u32 = 41; +pub const NET_MAXID: u32 = 41; pub const NET_RT_DUMP: u32 = 1; pub const NET_RT_FLAGS: u32 = 2; pub const NET_RT_IFLIST: u32 = 3; @@ -1196,6 +1262,7 @@ pub const MSG_SEND: u32 = 4096; pub const MSG_HAVEMORE: u32 = 8192; pub const MSG_RCVMORE: u32 = 16384; pub const MSG_NEEDSA: u32 = 65536; +pub const MSG_NOSIGNAL: u32 = 524288; pub const SCM_RIGHTS: u32 = 1; pub const SCM_TIMESTAMP: u32 = 2; pub const SCM_CREDS: u32 = 3; @@ -1360,6 +1427,7 @@ pub const IP_BOUND_IF: u32 = 25; pub const IP_PKTINFO: u32 = 26; pub const IP_RECVPKTINFO: u32 = 26; pub const IP_RECVTOS: u32 = 27; +pub const IP_DONTFRAG: u32 = 28; pub const IP_FW_ADD: u32 = 40; pub const IP_FW_DEL: u32 = 41; pub const IP_FW_FLUSH: u32 = 42; @@ -1433,6 +1501,9 @@ pub const __IPV6_ADDR_SCOPE_LINKLOCAL: u32 = 2; pub const __IPV6_ADDR_SCOPE_SITELOCAL: u32 = 5; pub const __IPV6_ADDR_SCOPE_ORGLOCAL: u32 = 8; pub const __IPV6_ADDR_SCOPE_GLOBAL: u32 = 14; +pub const IPV6_ADDR_MC_FLAGS_TRANSIENT: u32 = 16; +pub const IPV6_ADDR_MC_FLAGS_PREFIX: u32 = 32; +pub const IPV6_ADDR_MC_FLAGS_UNICAST_BASED: u32 = 48; pub const IPV6_SOCKOPT_RESERVED1: u32 = 3; pub const IPV6_UNICAST_HOPS: u32 = 4; pub const IPV6_MULTICAST_IF: u32 = 9; @@ -1760,7 +1831,7 @@ pub const SIZE_T_MAX: i32 = -1; pub const UQUAD_MAX: i32 = -1; pub const QUAD_MAX: u64 = 9223372036854775807; pub const QUAD_MIN: i64 = -9223372036854775808; -pub const ARG_MAX: u32 = 262144; +pub const ARG_MAX: u32 = 1048576; pub const CHILD_MAX: u32 = 266; pub const GID_MAX: u32 = 2147483647; pub const LINK_MAX: u32 = 32767; @@ -1891,6 +1962,13 @@ pub const O_NOFOLLOW: u32 = 256; pub const O_CREAT: u32 = 512; pub const O_TRUNC: u32 = 1024; pub const O_EXCL: u32 = 2048; +pub const O_EVTONLY: u32 = 32768; +pub const O_NOCTTY: u32 = 131072; +pub const O_DIRECTORY: u32 = 1048576; +pub const O_SYMLINK: u32 = 2097152; +pub const O_DSYNC: u32 = 4194304; +pub const O_CLOEXEC: u32 = 16777216; +pub const O_NOFOLLOW_ANY: u32 = 536870912; pub const AT_FDCWD: i32 = -2; pub const AT_EACCESS: u32 = 16; pub const AT_SYMLINK_NOFOLLOW: u32 = 32; @@ -1898,12 +1976,6 @@ pub const AT_SYMLINK_FOLLOW: u32 = 64; pub const AT_REMOVEDIR: u32 = 128; pub const AT_REALDEV: u32 = 512; pub const AT_FDONLY: u32 = 1024; -pub const O_EVTONLY: u32 = 32768; -pub const O_NOCTTY: u32 = 131072; -pub const O_DIRECTORY: u32 = 1048576; -pub const O_SYMLINK: u32 = 2097152; -pub const O_DSYNC: u32 = 4194304; -pub const O_CLOEXEC: u32 = 16777216; pub const O_DP_GETRAWENCRYPTED: u32 = 1; pub const O_DP_GETRAWUNENCRYPTED: u32 = 2; pub const FAPPEND: u32 = 8; @@ -1965,6 +2037,9 @@ pub const F_PUNCHHOLE: u32 = 99; pub const F_TRIM_ACTIVE_FILE: u32 = 100; pub const F_SPECULATIVE_READ: u32 = 101; pub const F_GETPATH_NOFIRMLINK: u32 = 102; +pub const F_ADDFILESIGS_INFO: u32 = 103; +pub const F_ADDFILESUPPL: u32 = 104; +pub const F_GETSIGSINFO: u32 = 105; pub const FCNTL_FS_SPECIFIC_BASE: u32 = 65536; pub const F_DUPFD_CLOEXEC: u32 = 67; pub const FD_CLOEXEC: u32 = 1; @@ -2005,6 +2080,8 @@ pub const F_ALLOCATECONTIG: u32 = 2; pub const F_ALLOCATEALL: u32 = 4; pub const F_PEOFPOSMODE: u32 = 3; pub const F_VOLPOSMODE: u32 = 4; +pub const USER_FSIGNATURES_CDHASH_LEN: u32 = 20; +pub const GETSIGSINFO_PLATFORM_BINARY: u32 = 1; pub const LOCK_SH: u32 = 1; pub const LOCK_EX: u32 = 2; pub const LOCK_NB: u32 = 4; @@ -2237,6 +2314,7 @@ pub const LOCAL_PEERPID: u32 = 2; pub const LOCAL_PEEREPID: u32 = 3; pub const LOCAL_PEERUUID: u32 = 4; pub const LOCAL_PEEREUUID: u32 = 5; +pub const LOCAL_PEERTOKEN: u32 = 6; pub const SM_DATABASE: u32 = 64; pub const SM_USER: u32 = 32; pub const SM_DATABASE_USER: u32 = 97; @@ -2338,6 +2416,63 @@ pub const PG_WAIT_IPC: u32 = 134217728; pub const PG_WAIT_TIMEOUT: u32 = 150994944; pub const PG_WAIT_IO: u32 = 167772160; pub const PGSTAT_NUM_PROGRESS_PARAM: u32 = 10; +pub const GIN_COMPARE_PROC: u32 = 1; +pub const GIN_EXTRACTVALUE_PROC: u32 = 2; +pub const GIN_EXTRACTQUERY_PROC: u32 = 3; +pub const GIN_CONSISTENT_PROC: u32 = 4; +pub const GIN_COMPARE_PARTIAL_PROC: u32 = 5; +pub const GIN_TRICONSISTENT_PROC: u32 = 6; +pub const GINNProcs: u32 = 6; +pub const GIN_SEARCH_MODE_DEFAULT: u32 = 0; +pub const GIN_SEARCH_MODE_INCLUDE_EMPTY: u32 = 1; +pub const GIN_SEARCH_MODE_ALL: u32 = 2; +pub const GIN_SEARCH_MODE_EVERYTHING: u32 = 3; +pub const GIN_FALSE: u32 = 0; +pub const GIN_TRUE: u32 = 1; +pub const GIN_MAYBE: u32 = 2; +pub const XLR_NORMAL_MAX_BLOCK_ID: u32 = 4; +pub const XLR_NORMAL_RDATAS: u32 = 20; +pub const REGBUF_FORCE_IMAGE: u32 = 1; +pub const REGBUF_NO_IMAGE: u32 = 2; +pub const REGBUF_WILL_INIT: u32 = 6; +pub const REGBUF_STANDARD: u32 = 8; +pub const REGBUF_KEEP_DATA: u32 = 16; +pub const SYNC_METHOD_FSYNC: u32 = 0; +pub const SYNC_METHOD_FDATASYNC: u32 = 1; +pub const SYNC_METHOD_OPEN: u32 = 2; +pub const SYNC_METHOD_FSYNC_WRITETHROUGH: u32 = 3; +pub const SYNC_METHOD_OPEN_DSYNC: u32 = 4; +pub const CHECKPOINT_IS_SHUTDOWN: u32 = 1; +pub const CHECKPOINT_END_OF_RECOVERY: u32 = 2; +pub const CHECKPOINT_IMMEDIATE: u32 = 4; +pub const CHECKPOINT_FORCE: u32 = 8; +pub const CHECKPOINT_FLUSH_ALL: u32 = 16; +pub const CHECKPOINT_WAIT: u32 = 32; +pub const CHECKPOINT_CAUSE_XLOG: u32 = 64; +pub const CHECKPOINT_CAUSE_TIME: u32 = 128; +pub const CHECKPOINT_REQUESTED: u32 = 256; +pub const XLOG_INCLUDE_ORIGIN: u32 = 1; +pub const XLOG_MARK_UNIMPORTANT: u32 = 2; +pub const BACKUP_LABEL_FILE: &'static [u8; 13usize] = b"backup_label\0"; +pub const BACKUP_LABEL_OLD: &'static [u8; 17usize] = b"backup_label.old\0"; +pub const TABLESPACE_MAP: &'static [u8; 15usize] = b"tablespace_map\0"; +pub const TABLESPACE_MAP_OLD: &'static [u8; 19usize] = b"tablespace_map.old\0"; +pub const GIST_CONSISTENT_PROC: u32 = 1; +pub const GIST_UNION_PROC: u32 = 2; +pub const GIST_COMPRESS_PROC: u32 = 3; +pub const GIST_DECOMPRESS_PROC: u32 = 4; +pub const GIST_PENALTY_PROC: u32 = 5; +pub const GIST_PICKSPLIT_PROC: u32 = 6; +pub const GIST_EQUAL_PROC: u32 = 7; +pub const GIST_DISTANCE_PROC: u32 = 8; +pub const GIST_FETCH_PROC: u32 = 9; +pub const GISTNProcs: u32 = 9; +pub const F_LEAF: u32 = 1; +pub const F_DELETED: u32 = 2; +pub const F_TUPLES_DELETED: u32 = 4; +pub const F_FOLLOW_RIGHT: u32 = 8; +pub const F_HAS_GARBAGE: u32 = 16; +pub const GIST_PAGE_ID: u32 = 65409; pub const FirstBootstrapObjectId: u32 = 10000; pub const FirstNormalObjectId: u32 = 16384; pub const MaxTupleAttributeNumber: u32 = 1664; @@ -3145,33 +3280,6 @@ pub const JB_FOBJECT: u32 = 536870912; pub const JB_FARRAY: u32 = 1073741824; pub const ATTSTATSSLOT_VALUES: u32 = 1; pub const ATTSTATSSLOT_NUMBERS: u32 = 2; -pub const XLR_NORMAL_MAX_BLOCK_ID: u32 = 4; -pub const XLR_NORMAL_RDATAS: u32 = 20; -pub const REGBUF_FORCE_IMAGE: u32 = 1; -pub const REGBUF_NO_IMAGE: u32 = 2; -pub const REGBUF_WILL_INIT: u32 = 6; -pub const REGBUF_STANDARD: u32 = 8; -pub const REGBUF_KEEP_DATA: u32 = 16; -pub const SYNC_METHOD_FSYNC: u32 = 0; -pub const SYNC_METHOD_FDATASYNC: u32 = 1; -pub const SYNC_METHOD_OPEN: u32 = 2; -pub const SYNC_METHOD_FSYNC_WRITETHROUGH: u32 = 3; -pub const SYNC_METHOD_OPEN_DSYNC: u32 = 4; -pub const CHECKPOINT_IS_SHUTDOWN: u32 = 1; -pub const CHECKPOINT_END_OF_RECOVERY: u32 = 2; -pub const CHECKPOINT_IMMEDIATE: u32 = 4; -pub const CHECKPOINT_FORCE: u32 = 8; -pub const CHECKPOINT_FLUSH_ALL: u32 = 16; -pub const CHECKPOINT_WAIT: u32 = 32; -pub const CHECKPOINT_CAUSE_XLOG: u32 = 64; -pub const CHECKPOINT_CAUSE_TIME: u32 = 128; -pub const CHECKPOINT_REQUESTED: u32 = 256; -pub const XLOG_INCLUDE_ORIGIN: u32 = 1; -pub const XLOG_MARK_UNIMPORTANT: u32 = 2; -pub const BACKUP_LABEL_FILE: &'static [u8; 13usize] = b"backup_label\0"; -pub const BACKUP_LABEL_OLD: &'static [u8; 17usize] = b"backup_label.old\0"; -pub const TABLESPACE_MAP: &'static [u8; 15usize] = b"tablespace_map\0"; -pub const TABLESPACE_MAP_OLD: &'static [u8; 19usize] = b"tablespace_map.old\0"; pub const IndexRelationId: u32 = 2610; pub const Anum_pg_index_indexrelid: u32 = 1; pub const Anum_pg_index_indrelid: u32 = 2; @@ -4674,6 +4782,182 @@ pub struct __darwin_x86_debug_state32 { pub __dr7: ::std::os::raw::c_uint, } #[repr(C)] +#[derive(Copy, Clone)] +pub struct __x86_instruction_state { + pub __insn_stream_valid_bytes: ::std::os::raw::c_int, + pub __insn_offset: ::std::os::raw::c_int, + pub __out_of_synch: ::std::os::raw::c_int, + pub __insn_bytes: [__uint8_t; 2380usize], + pub __insn_cacheline: [__uint8_t; 64usize], +} +impl Default for __x86_instruction_state { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __last_branch_record { + pub __from_ip: __uint64_t, + pub __to_ip: __uint64_t, + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_padding_0: u32, +} +impl __last_branch_record { + #[inline] + pub fn __mispredict(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___mispredict(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn __tsx_abort(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___tsx_abort(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn __in_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set___in_tsx(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn __cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 16u8) as u32) } + } + #[inline] + pub fn set___cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 16u8, val as u64) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 13u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + __mispredict: __uint32_t, + __tsx_abort: __uint32_t, + __in_tsx: __uint32_t, + __cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __mispredict: u32 = unsafe { ::std::mem::transmute(__mispredict) }; + __mispredict as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __tsx_abort: u32 = unsafe { ::std::mem::transmute(__tsx_abort) }; + __tsx_abort as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let __in_tsx: u32 = unsafe { ::std::mem::transmute(__in_tsx) }; + __in_tsx as u64 + }); + __bindgen_bitfield_unit.set(3usize, 16u8, { + let __cycle_count: u32 = unsafe { ::std::mem::transmute(__cycle_count) }; + __cycle_count as u64 + }); + __bindgen_bitfield_unit.set(19usize, 13u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __last_branch_state { + pub __lbr_count: ::std::os::raw::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __lbrs: [__last_branch_record; 32usize], +} +impl __last_branch_state { + #[inline] + pub fn __lbr_supported_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_tsx(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn __lbr_supported_cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + __lbr_supported_tsx: __uint32_t, + __lbr_supported_cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __lbr_supported_tsx: u32 = unsafe { ::std::mem::transmute(__lbr_supported_tsx) }; + __lbr_supported_tsx as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __lbr_supported_cycle_count: u32 = + unsafe { ::std::mem::transmute(__lbr_supported_cycle_count) }; + __lbr_supported_cycle_count as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct __x86_pagein_state { pub __pagein_error: ::std::os::raw::c_int, @@ -5404,7 +5688,48 @@ pub struct rusage_info_v4 { pub ri_interval_max_phys_footprint: u64, pub ri_runnable_time: u64, } -pub type rusage_info_current = rusage_info_v4; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct rusage_info_v5 { + pub ri_uuid: [u8; 16usize], + pub ri_user_time: u64, + pub ri_system_time: u64, + pub ri_pkg_idle_wkups: u64, + pub ri_interrupt_wkups: u64, + pub ri_pageins: u64, + pub ri_wired_size: u64, + pub ri_resident_size: u64, + pub ri_phys_footprint: u64, + pub ri_proc_start_abstime: u64, + pub ri_proc_exit_abstime: u64, + pub ri_child_user_time: u64, + pub ri_child_system_time: u64, + pub ri_child_pkg_idle_wkups: u64, + pub ri_child_interrupt_wkups: u64, + pub ri_child_pageins: u64, + pub ri_child_elapsed_abstime: u64, + pub ri_diskio_bytesread: u64, + pub ri_diskio_byteswritten: u64, + pub ri_cpu_time_qos_default: u64, + pub ri_cpu_time_qos_maintenance: u64, + pub ri_cpu_time_qos_background: u64, + pub ri_cpu_time_qos_utility: u64, + pub ri_cpu_time_qos_legacy: u64, + pub ri_cpu_time_qos_user_initiated: u64, + pub ri_cpu_time_qos_user_interactive: u64, + pub ri_billed_system_time: u64, + pub ri_serviced_system_time: u64, + pub ri_logical_writes: u64, + pub ri_lifetime_max_phys_footprint: u64, + pub ri_instructions: u64, + pub ri_cycles: u64, + pub ri_billed_energy: u64, + pub ri_serviced_energy: u64, + pub ri_interval_max_phys_footprint: u64, + pub ri_runnable_time: u64, + pub ri_flags: u64, +} +pub type rusage_info_current = rusage_info_v5; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct rlimit { @@ -6349,6 +6674,15 @@ extern "C" { ) -> *mut ::std::os::raw::c_void; } #[pg_guard] +extern "C" { + pub fn strtonum( + __numstr: *const ::std::os::raw::c_char, + __minval: ::std::os::raw::c_longlong, + __maxval: ::std::os::raw::c_longlong, + __errstrp: *mut *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_longlong; +} +#[pg_guard] extern "C" { pub fn strtoq( __str: *const ::std::os::raw::c_char, @@ -6687,6 +7021,14 @@ extern "C" { ) -> ::std::os::raw::c_int; } #[pg_guard] +extern "C" { + pub fn strsignal_r( + __sig: ::std::os::raw::c_int, + __strsignalbuf: *mut ::std::os::raw::c_char, + __buflen: usize, + ) -> ::std::os::raw::c_int; +} +#[pg_guard] extern "C" { pub fn bcmp( arg1: *const ::std::os::raw::c_void, @@ -12461,27 +12803,13 @@ pub struct radvisory { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct fcodeblobs { - pub f_cd_hash: *mut ::std::os::raw::c_void, - pub f_hash_size: usize, - pub f_cd_buffer: *mut ::std::os::raw::c_void, - pub f_cd_size: usize, - pub f_out_size: *mut ::std::os::raw::c_uint, - pub f_arch: ::std::os::raw::c_int, - pub __padding: ::std::os::raw::c_int, -} -impl Default for fcodeblobs { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type fcodeblobs_t = fcodeblobs; -#[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct fsignatures { pub fs_file_start: off_t, pub fs_blob_start: *mut ::std::os::raw::c_void, pub fs_blob_size: usize, + pub fs_fsignatures_size: usize, + pub fs_cdhash: [::std::os::raw::c_char; 20usize], + pub fs_hash_type: ::std::os::raw::c_int, } impl Default for fsignatures { fn default() -> Self { @@ -12490,6 +12818,15 @@ impl Default for fsignatures { } pub type fsignatures_t = fsignatures; #[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct fsupplement { + pub fs_file_start: off_t, + pub fs_blob_start: off_t, + pub fs_blob_size: usize, + pub fs_orig_fd: ::std::os::raw::c_int, +} +pub type fsupplement_t = fsupplement; +#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct fchecklv { pub lv_file_start: off_t, @@ -12504,6 +12841,14 @@ impl Default for fchecklv { pub type fchecklv_t = fchecklv; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] +pub struct fgetsigsinfo { + pub fg_file_start: off_t, + pub fg_info_request: ::std::os::raw::c_int, + pub fg_sig_is_platform: ::std::os::raw::c_int, +} +pub type fgetsigsinfo_t = fgetsigsinfo; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] pub struct fstore { pub fst_flags: ::std::os::raw::c_uint, pub fst_posmode: ::std::os::raw::c_int, @@ -27617,329 +27962,922 @@ extern "C" { } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] -pub struct VariableCacheData { - pub nextOid: Oid, - pub oidCount: uint32, - pub nextXid: TransactionId, - pub oldestXid: TransactionId, - pub xidVacLimit: TransactionId, - pub xidWarnLimit: TransactionId, - pub xidStopLimit: TransactionId, - pub xidWrapLimit: TransactionId, - pub oldestXidDB: Oid, - pub oldestCommitTsXid: TransactionId, - pub newestCommitTsXid: TransactionId, - pub latestCompletedXid: TransactionId, - pub oldestClogXid: TransactionId, +pub struct GinStatsData { + pub nPendingPages: BlockNumber, + pub nTotalPages: BlockNumber, + pub nEntryPages: BlockNumber, + pub nDataPages: BlockNumber, + pub nEntries: int64, + pub ginVersion: int32, } -pub type VariableCache = *mut VariableCacheData; +pub type GinTernaryValue = ::std::os::raw::c_char; #[pg_guard] extern "C" { - pub fn TransactionStartedDuringRecovery() -> bool; + pub static mut GinFuzzySearchLimit: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut ShmemVariableCache: VariableCache; + pub static mut gin_pending_list_limit: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn TransactionIdDidCommit(transactionId: TransactionId) -> bool; + pub fn ginGetStats(index: Relation, stats: *mut GinStatsData); } #[pg_guard] extern "C" { - pub fn TransactionIdDidAbort(transactionId: TransactionId) -> bool; + pub fn ginUpdateStats(index: Relation, stats: *const GinStatsData); } #[pg_guard] extern "C" { - pub fn TransactionIdIsKnownCompleted(transactionId: TransactionId) -> bool; + pub fn XLogBeginInsert(); } #[pg_guard] extern "C" { - pub fn TransactionIdAbort(transactionId: TransactionId); + pub fn XLogSetRecordFlags(flags: uint8); } #[pg_guard] extern "C" { - pub fn TransactionIdCommitTree( - xid: TransactionId, - nxids: ::std::os::raw::c_int, - xids: *mut TransactionId, - ); + pub fn XLogInsert(rmid: RmgrId, info: uint8) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn TransactionIdAsyncCommitTree( - xid: TransactionId, - nxids: ::std::os::raw::c_int, - xids: *mut TransactionId, - lsn: XLogRecPtr, - ); + pub fn XLogEnsureRecordSpace(nbuffers: ::std::os::raw::c_int, ndatas: ::std::os::raw::c_int); } #[pg_guard] extern "C" { - pub fn TransactionIdAbortTree( - xid: TransactionId, - nxids: ::std::os::raw::c_int, - xids: *mut TransactionId, - ); + pub fn XLogRegisterData(data: *mut ::std::os::raw::c_char, len: ::std::os::raw::c_int); } #[pg_guard] extern "C" { - pub fn TransactionIdPrecedes(id1: TransactionId, id2: TransactionId) -> bool; + pub fn XLogRegisterBuffer(block_id: uint8, buffer: Buffer, flags: uint8); } #[pg_guard] extern "C" { - pub fn TransactionIdPrecedesOrEquals(id1: TransactionId, id2: TransactionId) -> bool; + pub fn XLogRegisterBlock( + block_id: uint8, + rnode: *mut RelFileNode, + forknum: ForkNumber, + blknum: BlockNumber, + page: *mut ::std::os::raw::c_char, + flags: uint8, + ); } #[pg_guard] extern "C" { - pub fn TransactionIdFollows(id1: TransactionId, id2: TransactionId) -> bool; + pub fn XLogRegisterBufData( + block_id: uint8, + data: *mut ::std::os::raw::c_char, + len: ::std::os::raw::c_int, + ); } #[pg_guard] extern "C" { - pub fn TransactionIdFollowsOrEquals(id1: TransactionId, id2: TransactionId) -> bool; + pub fn XLogResetInsertion(); } #[pg_guard] extern "C" { - pub fn TransactionIdLatest( - mainxid: TransactionId, - nxids: ::std::os::raw::c_int, - xids: *const TransactionId, - ) -> TransactionId; + pub fn XLogCheckBufferNeedsBackup(buffer: Buffer) -> bool; } #[pg_guard] extern "C" { - pub fn TransactionIdGetCommitLSN(xid: TransactionId) -> XLogRecPtr; + pub fn log_newpage( + rnode: *mut RelFileNode, + forkNum: ForkNumber, + blk: BlockNumber, + page: *mut ::std::os::raw::c_char, + page_std: bool, + ) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn GetNewTransactionId(isSubXact: bool) -> TransactionId; + pub fn log_newpage_buffer(buffer: Buffer, page_std: bool) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn ReadNewTransactionId() -> TransactionId; + pub fn log_newpage_range( + rel: Relation, + forkNum: ForkNumber, + startblk: BlockNumber, + endblk: BlockNumber, + page_std: bool, + ); } #[pg_guard] extern "C" { - pub fn SetTransactionIdLimit(oldest_datfrozenxid: TransactionId, oldest_datoid: Oid); + pub fn XLogSaveBufferForHint(buffer: Buffer, buffer_std: bool) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn AdvanceOldestClogXid(oldest_datfrozenxid: TransactionId); + pub fn InitXLogInsert(); } #[pg_guard] extern "C" { - pub fn ForceTransactionIdLimitUpdate() -> bool; + pub static mut sync_method: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn GetNewObjectId() -> Oid; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct HeapTupleFields { - pub t_xmin: TransactionId, - pub t_xmax: TransactionId, - pub t_field3: HeapTupleFields__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union HeapTupleFields__bindgen_ty_1 { - pub t_cid: CommandId, - pub t_xvac: TransactionId, - _bindgen_union_align: u32, -} -impl Default for HeapTupleFields__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -impl Default for HeapTupleFields { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct DatumTupleFields { - pub datum_len_: int32, - pub datum_typmod: int32, - pub datum_typeid: Oid, -} -#[repr(C)] -pub struct HeapTupleHeaderData { - pub t_choice: HeapTupleHeaderData__bindgen_ty_1, - pub t_ctid: ItemPointerData, - pub t_infomask2: uint16, - pub t_infomask: uint16, - pub t_hoff: uint8, - pub t_bits: __IncompleteArrayField, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union HeapTupleHeaderData__bindgen_ty_1 { - pub t_heap: HeapTupleFields, - pub t_datum: DatumTupleFields, - _bindgen_union_align: [u32; 3usize], -} -impl Default for HeapTupleHeaderData__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } + pub static mut ThisTimeLineID: TimeLineID; } -impl Default for HeapTupleHeaderData { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub static mut InRecovery: bool; } -#[repr(C)] -#[derive(Debug, Default)] -pub struct MinimalTupleData { - pub t_len: uint32, - pub mt_padding: [::std::os::raw::c_char; 6usize], - pub t_infomask2: uint16, - pub t_infomask: uint16, - pub t_hoff: uint8, - pub t_bits: __IncompleteArrayField, +pub const HotStandbyState_STANDBY_DISABLED: HotStandbyState = 0; +pub const HotStandbyState_STANDBY_INITIALIZED: HotStandbyState = 1; +pub const HotStandbyState_STANDBY_SNAPSHOT_PENDING: HotStandbyState = 2; +pub const HotStandbyState_STANDBY_SNAPSHOT_READY: HotStandbyState = 3; +pub type HotStandbyState = ::std::os::raw::c_uint; +#[pg_guard] +extern "C" { + pub static mut standbyState: HotStandbyState; } +pub const RecoveryTargetType_RECOVERY_TARGET_UNSET: RecoveryTargetType = 0; +pub const RecoveryTargetType_RECOVERY_TARGET_XID: RecoveryTargetType = 1; +pub const RecoveryTargetType_RECOVERY_TARGET_TIME: RecoveryTargetType = 2; +pub const RecoveryTargetType_RECOVERY_TARGET_NAME: RecoveryTargetType = 3; +pub const RecoveryTargetType_RECOVERY_TARGET_LSN: RecoveryTargetType = 4; +pub const RecoveryTargetType_RECOVERY_TARGET_IMMEDIATE: RecoveryTargetType = 5; +pub type RecoveryTargetType = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn heap_compute_data_size( - tupleDesc: TupleDesc, - values: *mut Datum, - isnull: *mut bool, - ) -> Size; + pub static mut ProcLastRecPtr: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn heap_fill_tuple( - tupleDesc: TupleDesc, - values: *mut Datum, - isnull: *mut bool, - data: *mut ::std::os::raw::c_char, - data_size: Size, - infomask: *mut uint16, - bit: *mut bits8, - ); + pub static mut XactLastRecEnd: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn heap_attisnull( - tup: HeapTuple, - attnum: ::std::os::raw::c_int, - tupleDesc: TupleDesc, - ) -> bool; + pub static mut XactLastCommitEnd: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn nocachegetattr(tup: HeapTuple, attnum: ::std::os::raw::c_int, att: TupleDesc) -> Datum; + pub static mut reachedConsistency: bool; } #[pg_guard] extern "C" { - pub fn heap_getsysattr( - tup: HeapTuple, - attnum: ::std::os::raw::c_int, - tupleDesc: TupleDesc, - isnull: *mut bool, - ) -> Datum; + pub static mut wal_segment_size: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn getmissingattr( - tupleDesc: TupleDesc, - attnum: ::std::os::raw::c_int, - isnull: *mut bool, - ) -> Datum; + pub static mut min_wal_size_mb: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn heap_copytuple(tuple: HeapTuple) -> HeapTuple; + pub static mut max_wal_size_mb: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn heap_copytuple_with_tuple(src: HeapTuple, dest: HeapTuple); + pub static mut wal_keep_segments: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn heap_copy_tuple_as_datum(tuple: HeapTuple, tupleDesc: TupleDesc) -> Datum; + pub static mut XLOGbuffers: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn heap_form_tuple( - tupleDescriptor: TupleDesc, - values: *mut Datum, - isnull: *mut bool, - ) -> HeapTuple; + pub static mut XLogArchiveTimeout: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn heap_modify_tuple( - tuple: HeapTuple, - tupleDesc: TupleDesc, - replValues: *mut Datum, - replIsnull: *mut bool, - doReplace: *mut bool, - ) -> HeapTuple; + pub static mut wal_retrieve_retry_interval: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn heap_modify_tuple_by_cols( - tuple: HeapTuple, - tupleDesc: TupleDesc, - nCols: ::std::os::raw::c_int, - replCols: *mut ::std::os::raw::c_int, - replValues: *mut Datum, - replIsnull: *mut bool, - ) -> HeapTuple; + pub static mut XLogArchiveCommand: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn heap_deform_tuple( - tuple: HeapTuple, - tupleDesc: TupleDesc, - values: *mut Datum, - isnull: *mut bool, - ); + pub static mut EnableHotStandby: bool; } #[pg_guard] extern "C" { - pub fn heap_freetuple(htup: HeapTuple); + pub static mut fullPageWrites: bool; } #[pg_guard] extern "C" { - pub fn heap_form_minimal_tuple( - tupleDescriptor: TupleDesc, - values: *mut Datum, - isnull: *mut bool, - ) -> MinimalTuple; + pub static mut wal_log_hints: bool; } #[pg_guard] extern "C" { - pub fn heap_free_minimal_tuple(mtup: MinimalTuple); + pub static mut wal_compression: bool; } #[pg_guard] extern "C" { - pub fn heap_copy_minimal_tuple(mtup: MinimalTuple) -> MinimalTuple; + pub static mut wal_consistency_checking: *mut bool; } #[pg_guard] extern "C" { - pub fn heap_tuple_from_minimal_tuple(mtup: MinimalTuple) -> HeapTuple; + pub static mut wal_consistency_checking_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn minimal_tuple_from_heap_tuple(htup: HeapTuple) -> MinimalTuple; + pub static mut log_checkpoints: bool; } #[pg_guard] extern "C" { - pub fn heap_expand_tuple(sourceTuple: HeapTuple, tupleDesc: TupleDesc) -> HeapTuple; + pub static mut CheckPointSegments: ::std::os::raw::c_int; } +pub const ArchiveMode_ARCHIVE_MODE_OFF: ArchiveMode = 0; +pub const ArchiveMode_ARCHIVE_MODE_ON: ArchiveMode = 1; +pub const ArchiveMode_ARCHIVE_MODE_ALWAYS: ArchiveMode = 2; +pub type ArchiveMode = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn minimal_expand_tuple(sourceTuple: HeapTuple, tupleDesc: TupleDesc) -> MinimalTuple; + pub static mut XLogArchiveMode: ::std::os::raw::c_int; } -pub const relopt_type_RELOPT_TYPE_BOOL: relopt_type = 0; -pub const relopt_type_RELOPT_TYPE_INT: relopt_type = 1; -pub const relopt_type_RELOPT_TYPE_REAL: relopt_type = 2; -pub const relopt_type_RELOPT_TYPE_STRING: relopt_type = 3; +pub const WalLevel_WAL_LEVEL_MINIMAL: WalLevel = 0; +pub const WalLevel_WAL_LEVEL_REPLICA: WalLevel = 1; +pub const WalLevel_WAL_LEVEL_LOGICAL: WalLevel = 2; +pub type WalLevel = ::std::os::raw::c_uint; +pub const RecoveryState_RECOVERY_STATE_CRASH: RecoveryState = 0; +pub const RecoveryState_RECOVERY_STATE_ARCHIVE: RecoveryState = 1; +pub const RecoveryState_RECOVERY_STATE_DONE: RecoveryState = 2; +pub type RecoveryState = ::std::os::raw::c_uint; +#[pg_guard] +extern "C" { + pub static mut wal_level: ::std::os::raw::c_int; +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct CheckpointStatsData { + pub ckpt_start_t: TimestampTz, + pub ckpt_write_t: TimestampTz, + pub ckpt_sync_t: TimestampTz, + pub ckpt_sync_end_t: TimestampTz, + pub ckpt_end_t: TimestampTz, + pub ckpt_bufs_written: ::std::os::raw::c_int, + pub ckpt_segs_added: ::std::os::raw::c_int, + pub ckpt_segs_removed: ::std::os::raw::c_int, + pub ckpt_segs_recycled: ::std::os::raw::c_int, + pub ckpt_sync_rels: ::std::os::raw::c_int, + pub ckpt_longest_sync: uint64, + pub ckpt_agg_sync_time: uint64, +} +#[pg_guard] +extern "C" { + pub static mut CheckpointStats: CheckpointStatsData; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct XLogRecData { + _unused: [u8; 0], +} +#[pg_guard] +extern "C" { + pub fn XLogInsertRecord( + rdata: *mut XLogRecData, + fpw_lsn: XLogRecPtr, + flags: uint8, + ) -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn XLogFlush(RecPtr: XLogRecPtr); +} +#[pg_guard] +extern "C" { + pub fn XLogBackgroundFlush() -> bool; +} +#[pg_guard] +extern "C" { + pub fn XLogNeedsFlush(RecPtr: XLogRecPtr) -> bool; +} +#[pg_guard] +extern "C" { + pub fn XLogFileInit( + segno: XLogSegNo, + use_existent: *mut bool, + use_lock: bool, + ) -> ::std::os::raw::c_int; +} +#[pg_guard] +extern "C" { + pub fn XLogFileOpen(segno: XLogSegNo) -> ::std::os::raw::c_int; +} +#[pg_guard] +extern "C" { + pub fn CheckXLogRemoved(segno: XLogSegNo, tli: TimeLineID); +} +#[pg_guard] +extern "C" { + pub fn XLogGetLastRemovedSegno() -> XLogSegNo; +} +#[pg_guard] +extern "C" { + pub fn XLogSetAsyncXactLSN(record: XLogRecPtr); +} +#[pg_guard] +extern "C" { + pub fn XLogSetReplicationSlotMinimumLSN(lsn: XLogRecPtr); +} +#[pg_guard] +extern "C" { + pub fn xlog_redo(record: *mut XLogReaderState); +} +#[pg_guard] +extern "C" { + pub fn xlog_desc(buf: StringInfo, record: *mut XLogReaderState); +} +#[pg_guard] +extern "C" { + pub fn xlog_identify(info: uint8) -> *const ::std::os::raw::c_char; +} +#[pg_guard] +extern "C" { + pub fn issue_xlog_fsync(fd: ::std::os::raw::c_int, segno: XLogSegNo); +} +#[pg_guard] +extern "C" { + pub fn RecoveryInProgress() -> bool; +} +#[pg_guard] +extern "C" { + pub fn GetRecoveryState() -> RecoveryState; +} +#[pg_guard] +extern "C" { + pub fn HotStandbyActive() -> bool; +} +#[pg_guard] +extern "C" { + pub fn HotStandbyActiveInReplay() -> bool; +} +#[pg_guard] +extern "C" { + pub fn XLogInsertAllowed() -> bool; +} +#[pg_guard] +extern "C" { + pub fn GetXLogReceiptTime(rtime: *mut TimestampTz, fromStream: *mut bool); +} +#[pg_guard] +extern "C" { + pub fn GetXLogReplayRecPtr(replayTLI: *mut TimeLineID) -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn GetXLogInsertRecPtr() -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn GetXLogWriteRecPtr() -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn RecoveryIsPaused() -> bool; +} +#[pg_guard] +extern "C" { + pub fn SetRecoveryPause(recoveryPause: bool); +} +#[pg_guard] +extern "C" { + pub fn GetLatestXTime() -> TimestampTz; +} +#[pg_guard] +extern "C" { + pub fn GetCurrentChunkReplayStartTime() -> TimestampTz; +} +#[pg_guard] +extern "C" { + pub fn XLogFileNameP(tli: TimeLineID, segno: XLogSegNo) -> *mut ::std::os::raw::c_char; +} +#[pg_guard] +extern "C" { + pub fn UpdateControlFile(); +} +#[pg_guard] +extern "C" { + pub fn GetSystemIdentifier() -> uint64; +} +#[pg_guard] +extern "C" { + pub fn GetMockAuthenticationNonce() -> *mut ::std::os::raw::c_char; +} +#[pg_guard] +extern "C" { + pub fn DataChecksumsEnabled() -> bool; +} +#[pg_guard] +extern "C" { + pub fn GetFakeLSNForUnloggedRel() -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn XLOGShmemSize() -> Size; +} +#[pg_guard] +extern "C" { + pub fn XLOGShmemInit(); +} +#[pg_guard] +extern "C" { + pub fn BootStrapXLOG(); +} +#[pg_guard] +extern "C" { + pub fn LocalProcessControlFile(reset: bool); +} +#[pg_guard] +extern "C" { + pub fn StartupXLOG(); +} +#[pg_guard] +extern "C" { + pub fn ShutdownXLOG(code: ::std::os::raw::c_int, arg: Datum); +} +#[pg_guard] +extern "C" { + pub fn InitXLOGAccess(); +} +#[pg_guard] +extern "C" { + pub fn CreateCheckPoint(flags: ::std::os::raw::c_int); +} +#[pg_guard] +extern "C" { + pub fn CreateRestartPoint(flags: ::std::os::raw::c_int) -> bool; +} +#[pg_guard] +extern "C" { + pub fn XLogPutNextOid(nextOid: Oid); +} +#[pg_guard] +extern "C" { + pub fn XLogRestorePoint(rpName: *const ::std::os::raw::c_char) -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn UpdateFullPageWrites(); +} +#[pg_guard] +extern "C" { + pub fn GetFullPageWriteInfo(RedoRecPtr_p: *mut XLogRecPtr, doPageWrites_p: *mut bool); +} +#[pg_guard] +extern "C" { + pub fn GetRedoRecPtr() -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn GetInsertRecPtr() -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn GetFlushRecPtr() -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn GetLastImportantRecPtr() -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn GetNextXidAndEpoch(xid: *mut TransactionId, epoch: *mut uint32); +} +#[pg_guard] +extern "C" { + pub fn RemovePromoteSignalFiles(); +} +#[pg_guard] +extern "C" { + pub fn CheckPromoteSignal() -> bool; +} +#[pg_guard] +extern "C" { + pub fn WakeupRecovery(); +} +#[pg_guard] +extern "C" { + pub fn SetWalWriterSleeping(sleeping: bool); +} +#[pg_guard] +extern "C" { + pub fn XLogRequestWalReceiverReply(); +} +#[pg_guard] +extern "C" { + pub fn assign_max_wal_size(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void); +} +#[pg_guard] +extern "C" { + pub fn assign_checkpoint_completion_target(newval: f64, extra: *mut ::std::os::raw::c_void); +} +pub const SessionBackupState_SESSION_BACKUP_NONE: SessionBackupState = 0; +pub const SessionBackupState_SESSION_BACKUP_EXCLUSIVE: SessionBackupState = 1; +pub const SessionBackupState_SESSION_BACKUP_NON_EXCLUSIVE: SessionBackupState = 2; +pub type SessionBackupState = ::std::os::raw::c_uint; +#[pg_guard] +extern "C" { + pub fn do_pg_start_backup( + backupidstr: *const ::std::os::raw::c_char, + fast: bool, + starttli_p: *mut TimeLineID, + labelfile: StringInfo, + tablespaces: *mut *mut List, + tblspcmapfile: StringInfo, + infotbssize: bool, + needtblspcmapfile: bool, + ) -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn do_pg_stop_backup( + labelfile: *mut ::std::os::raw::c_char, + waitforarchive: bool, + stoptli_p: *mut TimeLineID, + ) -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn do_pg_abort_backup(code: ::std::os::raw::c_int, arg: Datum); +} +#[pg_guard] +extern "C" { + pub fn register_persistent_abort_backup_handler(); +} +#[pg_guard] +extern "C" { + pub fn get_backup_status() -> SessionBackupState; +} +pub type GistNSN = XLogRecPtr; +pub type PageGistNSN = PageXLogRecPtr; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct GISTPageOpaqueData { + pub nsn: PageGistNSN, + pub rightlink: BlockNumber, + pub flags: uint16, + pub gist_page_id: uint16, +} +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, + pub spl_ldatum: Datum, + pub spl_ldatum_exists: bool, + pub spl_right: *mut OffsetNumber, + pub spl_nright: ::std::os::raw::c_int, + pub spl_rdatum: Datum, + pub spl_rdatum_exists: bool, +} +impl Default for GIST_SPLITVEC { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GISTENTRY { + pub key: Datum, + pub rel: Relation, + pub page: Page, + pub offset: OffsetNumber, + pub leafkey: bool, +} +impl Default for GISTENTRY { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug)] +pub struct GistEntryVector { + pub n: int32, + pub vector: __IncompleteArrayField, +} +impl Default for GistEntryVector { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct VariableCacheData { + pub nextOid: Oid, + pub oidCount: uint32, + pub nextXid: TransactionId, + pub oldestXid: TransactionId, + pub xidVacLimit: TransactionId, + pub xidWarnLimit: TransactionId, + pub xidStopLimit: TransactionId, + pub xidWrapLimit: TransactionId, + pub oldestXidDB: Oid, + pub oldestCommitTsXid: TransactionId, + pub newestCommitTsXid: TransactionId, + pub latestCompletedXid: TransactionId, + pub oldestClogXid: TransactionId, +} +pub type VariableCache = *mut VariableCacheData; +#[pg_guard] +extern "C" { + pub fn TransactionStartedDuringRecovery() -> bool; +} +#[pg_guard] +extern "C" { + pub static mut ShmemVariableCache: VariableCache; +} +#[pg_guard] +extern "C" { + pub fn TransactionIdDidCommit(transactionId: TransactionId) -> bool; +} +#[pg_guard] +extern "C" { + pub fn TransactionIdDidAbort(transactionId: TransactionId) -> bool; +} +#[pg_guard] +extern "C" { + pub fn TransactionIdIsKnownCompleted(transactionId: TransactionId) -> bool; +} +#[pg_guard] +extern "C" { + pub fn TransactionIdAbort(transactionId: TransactionId); +} +#[pg_guard] +extern "C" { + pub fn TransactionIdCommitTree( + xid: TransactionId, + nxids: ::std::os::raw::c_int, + xids: *mut TransactionId, + ); +} +#[pg_guard] +extern "C" { + pub fn TransactionIdAsyncCommitTree( + xid: TransactionId, + nxids: ::std::os::raw::c_int, + xids: *mut TransactionId, + lsn: XLogRecPtr, + ); +} +#[pg_guard] +extern "C" { + pub fn TransactionIdAbortTree( + xid: TransactionId, + nxids: ::std::os::raw::c_int, + xids: *mut TransactionId, + ); +} +#[pg_guard] +extern "C" { + pub fn TransactionIdPrecedes(id1: TransactionId, id2: TransactionId) -> bool; +} +#[pg_guard] +extern "C" { + pub fn TransactionIdPrecedesOrEquals(id1: TransactionId, id2: TransactionId) -> bool; +} +#[pg_guard] +extern "C" { + pub fn TransactionIdFollows(id1: TransactionId, id2: TransactionId) -> bool; +} +#[pg_guard] +extern "C" { + pub fn TransactionIdFollowsOrEquals(id1: TransactionId, id2: TransactionId) -> bool; +} +#[pg_guard] +extern "C" { + pub fn TransactionIdLatest( + mainxid: TransactionId, + nxids: ::std::os::raw::c_int, + xids: *const TransactionId, + ) -> TransactionId; +} +#[pg_guard] +extern "C" { + pub fn TransactionIdGetCommitLSN(xid: TransactionId) -> XLogRecPtr; +} +#[pg_guard] +extern "C" { + pub fn GetNewTransactionId(isSubXact: bool) -> TransactionId; +} +#[pg_guard] +extern "C" { + pub fn ReadNewTransactionId() -> TransactionId; +} +#[pg_guard] +extern "C" { + pub fn SetTransactionIdLimit(oldest_datfrozenxid: TransactionId, oldest_datoid: Oid); +} +#[pg_guard] +extern "C" { + pub fn AdvanceOldestClogXid(oldest_datfrozenxid: TransactionId); +} +#[pg_guard] +extern "C" { + pub fn ForceTransactionIdLimitUpdate() -> bool; +} +#[pg_guard] +extern "C" { + pub fn GetNewObjectId() -> Oid; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct HeapTupleFields { + pub t_xmin: TransactionId, + pub t_xmax: TransactionId, + pub t_field3: HeapTupleFields__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union HeapTupleFields__bindgen_ty_1 { + pub t_cid: CommandId, + pub t_xvac: TransactionId, + _bindgen_union_align: u32, +} +impl Default for HeapTupleFields__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl Default for HeapTupleFields { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct DatumTupleFields { + pub datum_len_: int32, + pub datum_typmod: int32, + pub datum_typeid: Oid, +} +#[repr(C)] +pub struct HeapTupleHeaderData { + pub t_choice: HeapTupleHeaderData__bindgen_ty_1, + pub t_ctid: ItemPointerData, + pub t_infomask2: uint16, + pub t_infomask: uint16, + pub t_hoff: uint8, + pub t_bits: __IncompleteArrayField, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union HeapTupleHeaderData__bindgen_ty_1 { + pub t_heap: HeapTupleFields, + pub t_datum: DatumTupleFields, + _bindgen_union_align: [u32; 3usize], +} +impl Default for HeapTupleHeaderData__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl Default for HeapTupleHeaderData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct MinimalTupleData { + pub t_len: uint32, + pub mt_padding: [::std::os::raw::c_char; 6usize], + pub t_infomask2: uint16, + pub t_infomask: uint16, + pub t_hoff: uint8, + pub t_bits: __IncompleteArrayField, +} +#[pg_guard] +extern "C" { + pub fn heap_compute_data_size( + tupleDesc: TupleDesc, + values: *mut Datum, + isnull: *mut bool, + ) -> Size; +} +#[pg_guard] +extern "C" { + pub fn heap_fill_tuple( + tupleDesc: TupleDesc, + values: *mut Datum, + isnull: *mut bool, + data: *mut ::std::os::raw::c_char, + data_size: Size, + infomask: *mut uint16, + bit: *mut bits8, + ); +} +#[pg_guard] +extern "C" { + pub fn heap_attisnull( + tup: HeapTuple, + attnum: ::std::os::raw::c_int, + tupleDesc: TupleDesc, + ) -> bool; +} +#[pg_guard] +extern "C" { + pub fn nocachegetattr(tup: HeapTuple, attnum: ::std::os::raw::c_int, att: TupleDesc) -> Datum; +} +#[pg_guard] +extern "C" { + pub fn heap_getsysattr( + tup: HeapTuple, + attnum: ::std::os::raw::c_int, + tupleDesc: TupleDesc, + isnull: *mut bool, + ) -> Datum; +} +#[pg_guard] +extern "C" { + pub fn getmissingattr( + tupleDesc: TupleDesc, + attnum: ::std::os::raw::c_int, + isnull: *mut bool, + ) -> Datum; +} +#[pg_guard] +extern "C" { + pub fn heap_copytuple(tuple: HeapTuple) -> HeapTuple; +} +#[pg_guard] +extern "C" { + pub fn heap_copytuple_with_tuple(src: HeapTuple, dest: HeapTuple); +} +#[pg_guard] +extern "C" { + pub fn heap_copy_tuple_as_datum(tuple: HeapTuple, tupleDesc: TupleDesc) -> Datum; +} +#[pg_guard] +extern "C" { + pub fn heap_form_tuple( + tupleDescriptor: TupleDesc, + values: *mut Datum, + isnull: *mut bool, + ) -> HeapTuple; +} +#[pg_guard] +extern "C" { + pub fn heap_modify_tuple( + tuple: HeapTuple, + tupleDesc: TupleDesc, + replValues: *mut Datum, + replIsnull: *mut bool, + doReplace: *mut bool, + ) -> HeapTuple; +} +#[pg_guard] +extern "C" { + pub fn heap_modify_tuple_by_cols( + tuple: HeapTuple, + tupleDesc: TupleDesc, + nCols: ::std::os::raw::c_int, + replCols: *mut ::std::os::raw::c_int, + replValues: *mut Datum, + replIsnull: *mut bool, + ) -> HeapTuple; +} +#[pg_guard] +extern "C" { + pub fn heap_deform_tuple( + tuple: HeapTuple, + tupleDesc: TupleDesc, + values: *mut Datum, + isnull: *mut bool, + ); +} +#[pg_guard] +extern "C" { + pub fn heap_freetuple(htup: HeapTuple); +} +#[pg_guard] +extern "C" { + pub fn heap_form_minimal_tuple( + tupleDescriptor: TupleDesc, + values: *mut Datum, + isnull: *mut bool, + ) -> MinimalTuple; +} +#[pg_guard] +extern "C" { + pub fn heap_free_minimal_tuple(mtup: MinimalTuple); +} +#[pg_guard] +extern "C" { + pub fn heap_copy_minimal_tuple(mtup: MinimalTuple) -> MinimalTuple; +} +#[pg_guard] +extern "C" { + pub fn heap_tuple_from_minimal_tuple(mtup: MinimalTuple) -> HeapTuple; +} +#[pg_guard] +extern "C" { + pub fn minimal_tuple_from_heap_tuple(htup: HeapTuple) -> MinimalTuple; +} +#[pg_guard] +extern "C" { + pub fn heap_expand_tuple(sourceTuple: HeapTuple, tupleDesc: TupleDesc) -> HeapTuple; +} +#[pg_guard] +extern "C" { + pub fn minimal_expand_tuple(sourceTuple: HeapTuple, tupleDesc: TupleDesc) -> MinimalTuple; +} +pub const relopt_type_RELOPT_TYPE_BOOL: relopt_type = 0; +pub const relopt_type_RELOPT_TYPE_INT: relopt_type = 1; +pub const relopt_type_RELOPT_TYPE_REAL: relopt_type = 2; +pub const relopt_type_RELOPT_TYPE_STRING: relopt_type = 3; pub type relopt_type = ::std::os::raw::c_uint; pub const relopt_kind_RELOPT_KIND_HEAP: relopt_kind = 1; pub const relopt_kind_RELOPT_KIND_TOAST: relopt_kind = 2; @@ -50461,2078 +51399,1565 @@ extern "C" { } #[pg_guard] extern "C" { - pub fn to_regrole(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn regrolerecv(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn regrolesend(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn regrolein(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_rotate_logfile(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_read_file(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn binary_upgrade_set_missing_value(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn brin_inclusion_opcinfo(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn brin_inclusion_add_value(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn brin_inclusion_consistent(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn brin_inclusion_union(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_in(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_out(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_trunc(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_eq(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_lt(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_le(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_gt(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_ge(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_ne(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_cmp(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_not(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_and(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_or(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddrtomacaddr8(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8tomacaddr(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn macaddr8_set7bit(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_int8_int8(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_int4_int8(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_int4_int4(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_int4_int2(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_int2_int8(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_int2_int4(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_int2_int2(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_date_interval(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_timestamp_interval(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_timestamptz_interval(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_interval_interval(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_time_interval(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_timetz_interval(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_float8_float8(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_float4_float8(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn in_range_numeric_numeric(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn ts_headline_jsonb_byid_opt(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn ts_headline_jsonb_byid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn ts_headline_jsonb_opt(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn ts_headline_jsonb(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn ts_headline_json_byid_opt(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn ts_headline_json_byid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn ts_headline_json_opt(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn ts_headline_json(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn jsonb_string_to_tsvector(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn json_string_to_tsvector(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn jsonb_string_to_tsvector_byid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn json_string_to_tsvector_byid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn jsonb_to_tsvector(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn jsonb_to_tsvector_byid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn json_to_tsvector(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn json_to_tsvector_byid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_event_trigger_table_rewrite_oid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_event_trigger_table_rewrite_reason(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_event_trigger_ddl_commands(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn phraseto_tsquery(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn tsquery_phrase(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn tsquery_phrase_distance(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn phraseto_tsquery_byid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn websearch_to_tsquery_byid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn websearch_to_tsquery(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn spg_bbox_quad_config(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn spg_poly_quad_compress(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn spg_box_quad_config(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn spg_box_quad_choose(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn spg_box_quad_picksplit(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn spg_box_quad_inner_consistent(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn spg_box_quad_leaf_consistent(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn satisfies_hash_partition(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_create(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_drop(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_oid(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_session_setup(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_session_reset(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_session_is_setup(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_session_progress(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_xact_setup(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_xact_reset(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_advance(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_replication_origin_progress(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_show_replication_origin_status(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_stat_get_subscription(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_get_publication_tables(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_get_replica_identity_index(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn pg_relation_is_publishable(fcinfo: FunctionCallInfo) -> Datum; -} -#[pg_guard] -extern "C" { - pub fn parse_bool(value: *const ::std::os::raw::c_char, result: *mut bool) -> bool; -} -#[pg_guard] -extern "C" { - pub fn parse_bool_with_len( - value: *const ::std::os::raw::c_char, - len: usize, - result: *mut bool, - ) -> bool; -} -#[pg_guard] -extern "C" { - pub fn domain_check( - value: Datum, - isnull: bool, - domainType: Oid, - extra: *mut *mut ::std::os::raw::c_void, - mcxt: MemoryContext, - ); -} -#[pg_guard] -extern "C" { - pub fn errdatatype(datatypeOid: Oid) -> ::std::os::raw::c_int; -} -#[pg_guard] -extern "C" { - pub fn errdomainconstraint( - datatypeOid: Oid, - conname: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -#[pg_guard] -extern "C" { - pub fn hex_encode( - src: *const ::std::os::raw::c_char, - len: ::std::os::raw::c_uint, - dst: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_uint; -} -#[pg_guard] -extern "C" { - pub fn hex_decode( - src: *const ::std::os::raw::c_char, - len: ::std::os::raw::c_uint, - dst: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_uint; -} -#[pg_guard] -extern "C" { - pub fn buildint2vector(int2s: *const int16, n: ::std::os::raw::c_int) -> *mut int2vector; -} -#[pg_guard] -extern "C" { - pub fn namecpy(n1: Name, n2: Name) -> ::std::os::raw::c_int; -} -#[pg_guard] -extern "C" { - pub fn namestrcpy(name: Name, str_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; + pub fn to_regrole(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn namestrcmp(name: Name, str_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; + pub fn regrolerecv(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn pg_atoi( - s: *const ::std::os::raw::c_char, - size: ::std::os::raw::c_int, - c: ::std::os::raw::c_int, - ) -> int32; + pub fn regrolesend(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn pg_itoa(i: int16, a: *mut ::std::os::raw::c_char); + pub fn regrolein(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn pg_ltoa(l: int32, a: *mut ::std::os::raw::c_char); + pub fn pg_rotate_logfile(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn pg_lltoa(ll: int64, a: *mut ::std::os::raw::c_char); + pub fn pg_read_file(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn pg_ltostr_zeropad( - str_: *mut ::std::os::raw::c_char, - value: int32, - minwidth: int32, - ) -> *mut ::std::os::raw::c_char; + pub fn binary_upgrade_set_missing_value(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn pg_ltostr( - str_: *mut ::std::os::raw::c_char, - value: int32, - ) -> *mut ::std::os::raw::c_char; + pub fn brin_inclusion_opcinfo(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn pg_strtouint64( - str_: *const ::std::os::raw::c_char, - endptr: *mut *mut ::std::os::raw::c_char, - base: ::std::os::raw::c_int, - ) -> uint64; + pub fn brin_inclusion_add_value(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub static mut extra_float_digits: ::std::os::raw::c_int; + pub fn brin_inclusion_consistent(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_float8_infinity() -> f64; + pub fn brin_inclusion_union(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_float4_infinity() -> f32; + pub fn macaddr8_in(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_float8_nan() -> f64; + pub fn macaddr8_out(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_float4_nan() -> f32; + pub fn macaddr8_trunc(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn is_infinite(val: f64) -> ::std::os::raw::c_int; + pub fn macaddr8_eq(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn float8in_internal( - num: *mut ::std::os::raw::c_char, - endptr_p: *mut *mut ::std::os::raw::c_char, - type_name: *const ::std::os::raw::c_char, - orig_string: *const ::std::os::raw::c_char, - ) -> f64; + pub fn macaddr8_lt(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn float8out_internal(num: f64) -> *mut ::std::os::raw::c_char; + pub fn macaddr8_le(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn float4_cmp_internal(a: float4, b: float4) -> ::std::os::raw::c_int; + pub fn macaddr8_gt(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn float8_cmp_internal(a: float8, b: float8) -> ::std::os::raw::c_int; + pub fn macaddr8_ge(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn buildoidvector(oids: *const Oid, n: ::std::os::raw::c_int) -> *mut oidvector; + pub fn macaddr8_ne(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn oidparse(node: *mut Node) -> Oid; + pub fn macaddr8_cmp(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn oid_cmp( - p1: *const ::std::os::raw::c_void, - p2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; + pub fn macaddr8_not(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn regexp_fixed_prefix( - text_re: *mut text, - case_insensitive: bool, - collation: Oid, - exact: *mut bool, - ) -> *mut ::std::os::raw::c_char; + pub fn macaddr8_and(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub static mut quote_all_identifiers: bool; + pub fn macaddr8_or(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn quote_identifier(ident: *const ::std::os::raw::c_char) -> *const ::std::os::raw::c_char; + pub fn macaddrtomacaddr8(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn quote_qualified_identifier( - qualifier: *const ::std::os::raw::c_char, - ident: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; + pub fn macaddr8tomacaddr(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn generate_operator_clause( - buf: fmStringInfo, - leftop: *const ::std::os::raw::c_char, - leftoptype: Oid, - opoid: Oid, - rightop: *const ::std::os::raw::c_char, - rightoptype: Oid, - ); + pub fn macaddr8_set7bit(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn bpchartruelen( - s: *mut ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub fn in_range_int8_int8(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn cstring_to_text(s: *const ::std::os::raw::c_char) -> *mut text; + pub fn in_range_int4_int8(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn cstring_to_text_with_len( - s: *const ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - ) -> *mut text; + pub fn in_range_int4_int4(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn text_to_cstring(t: *const text) -> *mut ::std::os::raw::c_char; + pub fn in_range_int4_int2(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn text_to_cstring_buffer( - src: *const text, - dst: *mut ::std::os::raw::c_char, - dst_len: usize, - ); + pub fn in_range_int2_int8(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn xidComparator( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; + pub fn in_range_int2_int4(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn inet_cidr_ntop( - af: ::std::os::raw::c_int, - src: *const ::std::os::raw::c_void, - bits: ::std::os::raw::c_int, - dst: *mut ::std::os::raw::c_char, - size: usize, - ) -> *mut ::std::os::raw::c_char; + pub fn in_range_int2_int2(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn inet_net_pton( - af: ::std::os::raw::c_int, - src: *const ::std::os::raw::c_char, - dst: *mut ::std::os::raw::c_void, - size: usize, - ) -> ::std::os::raw::c_int; + pub fn in_range_date_interval(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn convert_network_to_scalar(value: Datum, typid: Oid, failure: *mut bool) -> f64; + pub fn in_range_timestamp_interval(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn network_scan_first(in_: Datum) -> Datum; + pub fn in_range_timestamptz_interval(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn network_scan_last(in_: Datum) -> Datum; + pub fn in_range_interval_interval(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn clean_ipv6_addr(addr_family: ::std::os::raw::c_int, addr: *mut ::std::os::raw::c_char); + pub fn in_range_time_interval(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn numeric_float8_no_overflow(fcinfo: FunctionCallInfo) -> Datum; + pub fn in_range_timetz_interval(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn format_type_extended( - type_oid: Oid, - typemod: int32, - flags: bits16, - ) -> *mut ::std::os::raw::c_char; + pub fn in_range_float8_float8(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn format_type_be(type_oid: Oid) -> *mut ::std::os::raw::c_char; + pub fn in_range_float4_float8(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn format_type_be_qualified(type_oid: Oid) -> *mut ::std::os::raw::c_char; + pub fn in_range_numeric_numeric(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn format_type_with_typemod(type_oid: Oid, typemod: int32) -> *mut ::std::os::raw::c_char; + pub fn ts_headline_jsonb_byid_opt(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn type_maximum_size(type_oid: Oid, typemod: int32) -> int32; + pub fn ts_headline_jsonb_byid(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn quote_literal_cstr(rawstr: *const ::std::os::raw::c_char) - -> *mut ::std::os::raw::c_char; -} -pub type DateADT = int32; -pub type TimeADT = int64; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct TimeTzADT { - pub time: TimeADT, - pub zone: int32, + pub fn ts_headline_jsonb_opt(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn anytime_typmod_check(istz: bool, typmod: int32) -> int32; + pub fn ts_headline_jsonb(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn date2timestamp_no_overflow(dateVal: DateADT) -> f64; + pub fn ts_headline_json_byid_opt(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn EncodeSpecialDate(dt: DateADT, str_: *mut ::std::os::raw::c_char); + pub fn ts_headline_json_byid(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn GetSQLCurrentDate() -> DateADT; + pub fn ts_headline_json_opt(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn GetSQLCurrentTime(typmod: int32) -> *mut TimeTzADT; + pub fn ts_headline_json(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn GetSQLLocalTime(typmod: int32) -> TimeADT; + pub fn jsonb_string_to_tsvector(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn time2tm(time: TimeADT, tm: *mut pg_tm, fsec: *mut fsec_t) -> ::std::os::raw::c_int; + pub fn json_string_to_tsvector(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn timetz2tm( - time: *mut TimeTzADT, - tm: *mut pg_tm, - fsec: *mut fsec_t, - tzp: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub fn jsonb_string_to_tsvector_byid(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn time_overflows( - hour: ::std::os::raw::c_int, - min: ::std::os::raw::c_int, - sec: ::std::os::raw::c_int, - fsec: fsec_t, - ) -> bool; + pub fn json_string_to_tsvector_byid(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn float_time_overflows( - hour: ::std::os::raw::c_int, - min: ::std::os::raw::c_int, - sec: f64, - ) -> bool; -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct Point { - pub x: float8, - pub y: float8, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct LSEG { - pub p: [Point; 2usize], -} -#[repr(C)] -#[derive(Debug, Default)] -pub struct PATH { - pub vl_len_: int32, - pub npts: int32, - pub closed: int32, - pub dummy: int32, - pub p: __IncompleteArrayField, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct LINE { - pub A: float8, - pub B: float8, - pub C: float8, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct BOX { - pub high: Point, - pub low: Point, -} -#[repr(C)] -#[derive(Debug, Default)] -pub struct POLYGON { - pub vl_len_: int32, - pub npts: int32, - pub boundbox: BOX, - pub p: __IncompleteArrayField, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct CIRCLE { - pub center: Point, - pub radius: float8, + pub fn jsonb_to_tsvector(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn point_dt(pt1: *mut Point, pt2: *mut Point) -> float8; + pub fn jsonb_to_tsvector_byid(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn point_sl(pt1: *mut Point, pt2: *mut Point) -> float8; + pub fn json_to_tsvector(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn pg_hypot(x: float8, y: float8) -> float8; + pub fn json_to_tsvector_byid(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn box_copy(box_: *mut BOX) -> *mut BOX; + pub fn pg_event_trigger_table_rewrite_oid(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn escape_json(buf: StringInfo, str_: *const ::std::os::raw::c_char); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct NumericData { - _unused: [u8; 0], + pub fn pg_event_trigger_table_rewrite_reason(fcinfo: FunctionCallInfo) -> Datum; } -pub type Numeric = *mut NumericData; #[pg_guard] extern "C" { - pub fn numeric_is_nan(num: Numeric) -> bool; + pub fn pg_event_trigger_ddl_commands(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn numeric_maximum_size(typmod: int32) -> int32; + pub fn phraseto_tsquery(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn numeric_out_sci( - num: Numeric, - scale: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; + pub fn tsquery_phrase(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn numeric_normalize(num: Numeric) -> *mut ::std::os::raw::c_char; -} -pub const JsonbIteratorToken_WJB_DONE: JsonbIteratorToken = 0; -pub const JsonbIteratorToken_WJB_KEY: JsonbIteratorToken = 1; -pub const JsonbIteratorToken_WJB_VALUE: JsonbIteratorToken = 2; -pub const JsonbIteratorToken_WJB_ELEM: JsonbIteratorToken = 3; -pub const JsonbIteratorToken_WJB_BEGIN_ARRAY: JsonbIteratorToken = 4; -pub const JsonbIteratorToken_WJB_END_ARRAY: JsonbIteratorToken = 5; -pub const JsonbIteratorToken_WJB_BEGIN_OBJECT: JsonbIteratorToken = 6; -pub const JsonbIteratorToken_WJB_END_OBJECT: JsonbIteratorToken = 7; -pub type JsonbIteratorToken = ::std::os::raw::c_uint; -pub type JEntry = uint32; -#[repr(C)] -#[derive(Debug, Default)] -pub struct JsonbContainer { - pub header: uint32, - pub children: __IncompleteArrayField, -} -#[repr(C)] -#[derive(Debug, Default)] -pub struct Jsonb { - pub vl_len_: int32, - pub root: JsonbContainer, -} -pub const jbvType_jbvNull: jbvType = 0; -pub const jbvType_jbvString: jbvType = 1; -pub const jbvType_jbvNumeric: jbvType = 2; -pub const jbvType_jbvBool: jbvType = 3; -pub const jbvType_jbvArray: jbvType = 16; -pub const jbvType_jbvObject: jbvType = 17; -pub const jbvType_jbvBinary: jbvType = 18; -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, - _bindgen_union_align: [u64; 3usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct JsonbValue__bindgen_ty_1__bindgen_ty_1 { - pub len: ::std::os::raw::c_int, - pub val: *mut ::std::os::raw::c_char, -} -impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct JsonbValue__bindgen_ty_1__bindgen_ty_2 { - pub nElems: ::std::os::raw::c_int, - pub elems: *mut JsonbValue, - pub rawScalar: bool, -} -impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct JsonbValue__bindgen_ty_1__bindgen_ty_3 { - pub nPairs: ::std::os::raw::c_int, - pub pairs: *mut JsonbPair, -} -impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct JsonbValue__bindgen_ty_1__bindgen_ty_4 { - pub len: ::std::os::raw::c_int, - pub data: *mut JsonbContainer, -} -impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_4 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -impl Default for JsonbValue__bindgen_ty_1 { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -impl Default for JsonbValue { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct JsonbPair { - pub key: JsonbValue, - pub value: JsonbValue, - pub order: uint32, -} -impl Default for JsonbPair { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct JsonbParseState { - pub contVal: JsonbValue, - pub size: Size, - pub next: *mut JsonbParseState, -} -impl Default for JsonbParseState { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub const JsonbIterState_JBI_ARRAY_START: JsonbIterState = 0; -pub const JsonbIterState_JBI_ARRAY_ELEM: JsonbIterState = 1; -pub const JsonbIterState_JBI_OBJECT_START: JsonbIterState = 2; -pub const JsonbIterState_JBI_OBJECT_KEY: JsonbIterState = 3; -pub const JsonbIterState_JBI_OBJECT_VALUE: JsonbIterState = 4; -pub type JsonbIterState = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct JsonbIterator { - pub container: *mut JsonbContainer, - pub nElems: uint32, - pub isScalar: bool, - pub children: *mut JEntry, - pub dataProper: *mut ::std::os::raw::c_char, - pub curIndex: ::std::os::raw::c_int, - pub curDataOffset: uint32, - pub curValueOffset: uint32, - pub state: JsonbIterState, - pub parent: *mut JsonbIterator, -} -impl Default for JsonbIterator { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } + pub fn tsquery_phrase_distance(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn getJsonbOffset(jc: *const JsonbContainer, index: ::std::os::raw::c_int) -> uint32; + pub fn phraseto_tsquery_byid(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn getJsonbLength(jc: *const JsonbContainer, index: ::std::os::raw::c_int) -> uint32; + pub fn websearch_to_tsquery_byid(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn compareJsonbContainers( - a: *mut JsonbContainer, - b: *mut JsonbContainer, - ) -> ::std::os::raw::c_int; + pub fn websearch_to_tsquery(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn findJsonbValueFromContainer( - sheader: *mut JsonbContainer, - flags: uint32, - key: *mut JsonbValue, - ) -> *mut JsonbValue; + pub fn spg_bbox_quad_config(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn getIthJsonbValueFromContainer( - sheader: *mut JsonbContainer, - i: uint32, - ) -> *mut JsonbValue; + pub fn spg_poly_quad_compress(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn pushJsonbValue( - pstate: *mut *mut JsonbParseState, - seq: JsonbIteratorToken, - jbVal: *mut JsonbValue, - ) -> *mut JsonbValue; + pub fn spg_box_quad_config(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn JsonbIteratorInit(container: *mut JsonbContainer) -> *mut JsonbIterator; + pub fn spg_box_quad_choose(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn JsonbIteratorNext( - it: *mut *mut JsonbIterator, - val: *mut JsonbValue, - skipNested: bool, - ) -> JsonbIteratorToken; + pub fn spg_box_quad_picksplit(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn JsonbValueToJsonb(val: *mut JsonbValue) -> *mut Jsonb; + pub fn spg_box_quad_inner_consistent(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn JsonbDeepContains( - val: *mut *mut JsonbIterator, - mContained: *mut *mut JsonbIterator, - ) -> bool; + pub fn spg_box_quad_leaf_consistent(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn JsonbHashScalarValue(scalarVal: *const JsonbValue, hash: *mut uint32); + pub fn satisfies_hash_partition(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn JsonbHashScalarValueExtended( - scalarVal: *const JsonbValue, - hash: *mut uint64, - seed: uint64, - ); + pub fn pg_replication_origin_create(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn JsonbToCString( - out: StringInfo, - in_: *mut JsonbContainer, - estimated_len: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; + pub fn pg_replication_origin_drop(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn JsonbToCStringIndent( - out: StringInfo, - in_: *mut JsonbContainer, - estimated_len: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct OpBtreeInterpretation { - pub opfamily_id: Oid, - pub strategy: ::std::os::raw::c_int, - pub oplefttype: Oid, - pub oprighttype: Oid, -} -pub const IOFuncSelector_IOFunc_input: IOFuncSelector = 0; -pub const IOFuncSelector_IOFunc_output: IOFuncSelector = 1; -pub const IOFuncSelector_IOFunc_receive: IOFuncSelector = 2; -pub const IOFuncSelector_IOFunc_send: IOFuncSelector = 3; -pub type IOFuncSelector = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct AttStatsSlot { - pub staop: Oid, - pub valuetype: Oid, - pub values: *mut Datum, - pub nvalues: ::std::os::raw::c_int, - pub numbers: *mut float4, - pub nnumbers: ::std::os::raw::c_int, - pub values_arr: *mut ::std::os::raw::c_void, - pub numbers_arr: *mut ::std::os::raw::c_void, + pub fn pg_replication_origin_oid(fcinfo: FunctionCallInfo) -> Datum; } -impl Default for AttStatsSlot { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn pg_replication_origin_session_setup(fcinfo: FunctionCallInfo) -> Datum; } -pub type get_attavgwidth_hook_type = - ::std::option::Option int32>; #[pg_guard] extern "C" { - pub static mut get_attavgwidth_hook: get_attavgwidth_hook_type; + pub fn pg_replication_origin_session_reset(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn op_in_opfamily(opno: Oid, opfamily: Oid) -> bool; + pub fn pg_replication_origin_session_is_setup(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_op_opfamily_strategy(opno: Oid, opfamily: Oid) -> ::std::os::raw::c_int; + pub fn pg_replication_origin_session_progress(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_op_opfamily_sortfamily(opno: Oid, opfamily: Oid) -> Oid; + pub fn pg_replication_origin_xact_setup(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_op_opfamily_properties( - opno: Oid, - opfamily: Oid, - ordering_op: bool, - strategy: *mut ::std::os::raw::c_int, - lefttype: *mut Oid, - righttype: *mut Oid, - ); + pub fn pg_replication_origin_xact_reset(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_opfamily_member( - opfamily: Oid, - lefttype: Oid, - righttype: Oid, - strategy: int16, - ) -> Oid; + pub fn pg_replication_origin_advance(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_ordering_op_properties( - opno: Oid, - opfamily: *mut Oid, - opcintype: *mut Oid, - strategy: *mut int16, - ) -> bool; + pub fn pg_replication_origin_progress(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_equality_op_for_ordering_op(opno: Oid, reverse: *mut bool) -> Oid; + pub fn pg_show_replication_origin_status(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_ordering_op_for_equality_op(opno: Oid, use_lhs_type: bool) -> Oid; + pub fn pg_stat_get_subscription(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_mergejoin_opfamilies(opno: Oid) -> *mut List; + pub fn pg_get_publication_tables(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_compatible_hash_operators(opno: Oid, lhs_opno: *mut Oid, rhs_opno: *mut Oid) - -> bool; + pub fn pg_get_replica_identity_index(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_op_hash_functions( - opno: Oid, - lhs_procno: *mut RegProcedure, - rhs_procno: *mut RegProcedure, + pub fn pg_relation_is_publishable(fcinfo: FunctionCallInfo) -> Datum; +} +#[pg_guard] +extern "C" { + pub fn parse_bool(value: *const ::std::os::raw::c_char, result: *mut bool) -> bool; +} +#[pg_guard] +extern "C" { + pub fn parse_bool_with_len( + value: *const ::std::os::raw::c_char, + len: usize, + result: *mut bool, ) -> bool; } #[pg_guard] extern "C" { - pub fn get_op_btree_interpretation(opno: Oid) -> *mut List; + pub fn domain_check( + value: Datum, + isnull: bool, + domainType: Oid, + extra: *mut *mut ::std::os::raw::c_void, + mcxt: MemoryContext, + ); } #[pg_guard] extern "C" { - pub fn equality_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; + pub fn errdatatype(datatypeOid: Oid) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_opfamily_proc(opfamily: Oid, lefttype: Oid, righttype: Oid, procnum: int16) -> Oid; + pub fn errdomainconstraint( + datatypeOid: Oid, + conname: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_attname( - relid: Oid, - attnum: AttrNumber, - missing_ok: bool, - ) -> *mut ::std::os::raw::c_char; + pub fn hex_encode( + src: *const ::std::os::raw::c_char, + len: ::std::os::raw::c_uint, + dst: *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_uint; } #[pg_guard] extern "C" { - pub fn get_attnum(relid: Oid, attname: *const ::std::os::raw::c_char) -> AttrNumber; + pub fn hex_decode( + src: *const ::std::os::raw::c_char, + len: ::std::os::raw::c_uint, + dst: *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_uint; } #[pg_guard] extern "C" { - pub fn get_attidentity(relid: Oid, attnum: AttrNumber) -> ::std::os::raw::c_char; + pub fn buildint2vector(int2s: *const int16, n: ::std::os::raw::c_int) -> *mut int2vector; } #[pg_guard] extern "C" { - pub fn get_atttype(relid: Oid, attnum: AttrNumber) -> Oid; + pub fn namecpy(n1: Name, n2: Name) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_atttypmod(relid: Oid, attnum: AttrNumber) -> int32; + pub fn namestrcpy(name: Name, str_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_atttypetypmodcoll( - relid: Oid, - attnum: AttrNumber, - typid: *mut Oid, - typmod: *mut int32, - collid: *mut Oid, - ); + pub fn namestrcmp(name: Name, str_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_collation_name(colloid: Oid) -> *mut ::std::os::raw::c_char; + pub fn pg_atoi( + s: *const ::std::os::raw::c_char, + size: ::std::os::raw::c_int, + c: ::std::os::raw::c_int, + ) -> int32; } #[pg_guard] extern "C" { - pub fn get_constraint_name(conoid: Oid) -> *mut ::std::os::raw::c_char; + pub fn pg_itoa(i: int16, a: *mut ::std::os::raw::c_char); } #[pg_guard] extern "C" { - pub fn get_language_name(langoid: Oid, missing_ok: bool) -> *mut ::std::os::raw::c_char; + pub fn pg_ltoa(l: int32, a: *mut ::std::os::raw::c_char); } #[pg_guard] extern "C" { - pub fn get_opclass_family(opclass: Oid) -> Oid; + pub fn pg_lltoa(ll: int64, a: *mut ::std::os::raw::c_char); } #[pg_guard] extern "C" { - pub fn get_opclass_input_type(opclass: Oid) -> Oid; + pub fn pg_ltostr_zeropad( + str_: *mut ::std::os::raw::c_char, + value: int32, + minwidth: int32, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_opcode(opno: Oid) -> RegProcedure; + pub fn pg_ltostr( + str_: *mut ::std::os::raw::c_char, + value: int32, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_opname(opno: Oid) -> *mut ::std::os::raw::c_char; + pub fn pg_strtouint64( + str_: *const ::std::os::raw::c_char, + endptr: *mut *mut ::std::os::raw::c_char, + base: ::std::os::raw::c_int, + ) -> uint64; } #[pg_guard] extern "C" { - pub fn get_op_rettype(opno: Oid) -> Oid; + pub static mut extra_float_digits: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn op_input_types(opno: Oid, lefttype: *mut Oid, righttype: *mut Oid); + pub fn get_float8_infinity() -> f64; } #[pg_guard] extern "C" { - pub fn op_mergejoinable(opno: Oid, inputtype: Oid) -> bool; + pub fn get_float4_infinity() -> f32; } #[pg_guard] extern "C" { - pub fn op_hashjoinable(opno: Oid, inputtype: Oid) -> bool; + pub fn get_float8_nan() -> f64; } #[pg_guard] extern "C" { - pub fn op_strict(opno: Oid) -> bool; + pub fn get_float4_nan() -> f32; } #[pg_guard] extern "C" { - pub fn op_volatile(opno: Oid) -> ::std::os::raw::c_char; + pub fn is_infinite(val: f64) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_commutator(opno: Oid) -> Oid; + pub fn float8in_internal( + num: *mut ::std::os::raw::c_char, + endptr_p: *mut *mut ::std::os::raw::c_char, + type_name: *const ::std::os::raw::c_char, + orig_string: *const ::std::os::raw::c_char, + ) -> f64; } #[pg_guard] extern "C" { - pub fn get_negator(opno: Oid) -> Oid; + pub fn float8out_internal(num: f64) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_oprrest(opno: Oid) -> RegProcedure; + pub fn float4_cmp_internal(a: float4, b: float4) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_oprjoin(opno: Oid) -> RegProcedure; + pub fn float8_cmp_internal(a: float8, b: float8) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_func_name(funcid: Oid) -> *mut ::std::os::raw::c_char; + pub fn buildoidvector(oids: *const Oid, n: ::std::os::raw::c_int) -> *mut oidvector; } #[pg_guard] extern "C" { - pub fn get_func_namespace(funcid: Oid) -> Oid; + pub fn oidparse(node: *mut Node) -> Oid; } #[pg_guard] extern "C" { - pub fn get_func_rettype(funcid: Oid) -> Oid; + pub fn oid_cmp( + p1: *const ::std::os::raw::c_void, + p2: *const ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_func_nargs(funcid: Oid) -> ::std::os::raw::c_int; + pub fn regexp_fixed_prefix( + text_re: *mut text, + case_insensitive: bool, + collation: Oid, + exact: *mut bool, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_func_signature( - funcid: Oid, - argtypes: *mut *mut Oid, - nargs: *mut ::std::os::raw::c_int, - ) -> Oid; + pub static mut quote_all_identifiers: bool; } #[pg_guard] extern "C" { - pub fn get_func_variadictype(funcid: Oid) -> Oid; + pub fn quote_identifier(ident: *const ::std::os::raw::c_char) -> *const ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_func_retset(funcid: Oid) -> bool; + pub fn quote_qualified_identifier( + qualifier: *const ::std::os::raw::c_char, + ident: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn func_strict(funcid: Oid) -> bool; + pub fn generate_operator_clause( + buf: fmStringInfo, + leftop: *const ::std::os::raw::c_char, + leftoptype: Oid, + opoid: Oid, + rightop: *const ::std::os::raw::c_char, + rightoptype: Oid, + ); } #[pg_guard] extern "C" { - pub fn func_volatile(funcid: Oid) -> ::std::os::raw::c_char; + pub fn bpchartruelen( + s: *mut ::std::os::raw::c_char, + len: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn func_parallel(funcid: Oid) -> ::std::os::raw::c_char; + pub fn cstring_to_text(s: *const ::std::os::raw::c_char) -> *mut text; } #[pg_guard] extern "C" { - pub fn get_func_prokind(funcid: Oid) -> ::std::os::raw::c_char; + pub fn cstring_to_text_with_len( + s: *const ::std::os::raw::c_char, + len: ::std::os::raw::c_int, + ) -> *mut text; } #[pg_guard] extern "C" { - pub fn get_func_leakproof(funcid: Oid) -> bool; + pub fn text_to_cstring(t: *const text) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_func_cost(funcid: Oid) -> float4; + pub fn text_to_cstring_buffer( + src: *const text, + dst: *mut ::std::os::raw::c_char, + dst_len: usize, + ); } #[pg_guard] extern "C" { - pub fn get_func_rows(funcid: Oid) -> float4; + pub fn xidComparator( + arg1: *const ::std::os::raw::c_void, + arg2: *const ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_relname_relid(relname: *const ::std::os::raw::c_char, relnamespace: Oid) -> Oid; + pub fn inet_cidr_ntop( + af: ::std::os::raw::c_int, + src: *const ::std::os::raw::c_void, + bits: ::std::os::raw::c_int, + dst: *mut ::std::os::raw::c_char, + size: usize, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_rel_name(relid: Oid) -> *mut ::std::os::raw::c_char; + pub fn inet_net_pton( + af: ::std::os::raw::c_int, + src: *const ::std::os::raw::c_char, + dst: *mut ::std::os::raw::c_void, + size: usize, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_rel_namespace(relid: Oid) -> Oid; + pub fn convert_network_to_scalar(value: Datum, typid: Oid, failure: *mut bool) -> f64; } #[pg_guard] extern "C" { - pub fn get_rel_type_id(relid: Oid) -> Oid; + pub fn network_scan_first(in_: Datum) -> Datum; } #[pg_guard] extern "C" { - pub fn get_rel_relkind(relid: Oid) -> ::std::os::raw::c_char; + pub fn network_scan_last(in_: Datum) -> Datum; } #[pg_guard] extern "C" { - pub fn get_rel_relispartition(relid: Oid) -> bool; + pub fn clean_ipv6_addr(addr_family: ::std::os::raw::c_int, addr: *mut ::std::os::raw::c_char); } #[pg_guard] extern "C" { - pub fn get_rel_tablespace(relid: Oid) -> Oid; + pub fn numeric_float8_no_overflow(fcinfo: FunctionCallInfo) -> Datum; } #[pg_guard] extern "C" { - pub fn get_rel_persistence(relid: Oid) -> ::std::os::raw::c_char; + pub fn format_type_extended( + type_oid: Oid, + typemod: int32, + flags: bits16, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_transform_fromsql(typid: Oid, langid: Oid, trftypes: *mut List) -> Oid; + pub fn format_type_be(type_oid: Oid) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_transform_tosql(typid: Oid, langid: Oid, trftypes: *mut List) -> Oid; + pub fn format_type_be_qualified(type_oid: Oid) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_typisdefined(typid: Oid) -> bool; + pub fn format_type_with_typemod(type_oid: Oid, typemod: int32) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn get_typlen(typid: Oid) -> int16; + pub fn type_maximum_size(type_oid: Oid, typemod: int32) -> int32; } #[pg_guard] extern "C" { - pub fn get_typbyval(typid: Oid) -> bool; + pub fn quote_literal_cstr(rawstr: *const ::std::os::raw::c_char) + -> *mut ::std::os::raw::c_char; +} +pub type DateADT = int32; +pub type TimeADT = int64; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct TimeTzADT { + pub time: TimeADT, + pub zone: int32, } #[pg_guard] extern "C" { - pub fn get_typlenbyval(typid: Oid, typlen: *mut int16, typbyval: *mut bool); + pub fn anytime_typmod_check(istz: bool, typmod: int32) -> int32; } #[pg_guard] extern "C" { - pub fn get_typlenbyvalalign( - typid: Oid, - typlen: *mut int16, - typbyval: *mut bool, - typalign: *mut ::std::os::raw::c_char, - ); + pub fn date2timestamp_no_overflow(dateVal: DateADT) -> f64; } #[pg_guard] extern "C" { - pub fn getTypeIOParam(typeTuple: HeapTuple) -> Oid; + pub fn EncodeSpecialDate(dt: DateADT, str_: *mut ::std::os::raw::c_char); } #[pg_guard] extern "C" { - pub fn get_type_io_data( - typid: Oid, - which_func: IOFuncSelector, - typlen: *mut int16, - typbyval: *mut bool, - typalign: *mut ::std::os::raw::c_char, - typdelim: *mut ::std::os::raw::c_char, - typioparam: *mut Oid, - func: *mut Oid, - ); + pub fn GetSQLCurrentDate() -> DateADT; } #[pg_guard] extern "C" { - pub fn get_typstorage(typid: Oid) -> ::std::os::raw::c_char; + pub fn GetSQLCurrentTime(typmod: int32) -> *mut TimeTzADT; } #[pg_guard] extern "C" { - pub fn get_typdefault(typid: Oid) -> *mut Node; + pub fn GetSQLLocalTime(typmod: int32) -> TimeADT; } #[pg_guard] extern "C" { - pub fn get_typtype(typid: Oid) -> ::std::os::raw::c_char; + pub fn time2tm(time: TimeADT, tm: *mut pg_tm, fsec: *mut fsec_t) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn type_is_rowtype(typid: Oid) -> bool; + pub fn timetz2tm( + time: *mut TimeTzADT, + tm: *mut pg_tm, + fsec: *mut fsec_t, + tzp: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn type_is_enum(typid: Oid) -> bool; + pub fn time_overflows( + hour: ::std::os::raw::c_int, + min: ::std::os::raw::c_int, + sec: ::std::os::raw::c_int, + fsec: fsec_t, + ) -> bool; } #[pg_guard] extern "C" { - pub fn type_is_range(typid: Oid) -> bool; + pub fn float_time_overflows( + hour: ::std::os::raw::c_int, + min: ::std::os::raw::c_int, + sec: f64, + ) -> bool; +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct Point { + pub x: float8, + pub y: float8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct LSEG { + pub p: [Point; 2usize], +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct PATH { + pub vl_len_: int32, + pub npts: int32, + pub closed: int32, + pub dummy: int32, + pub p: __IncompleteArrayField, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct LINE { + pub A: float8, + pub B: float8, + pub C: float8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct BOX { + pub high: Point, + pub low: Point, +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct POLYGON { + pub vl_len_: int32, + pub npts: int32, + pub boundbox: BOX, + pub p: __IncompleteArrayField, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct CIRCLE { + pub center: Point, + pub radius: float8, } #[pg_guard] extern "C" { - pub fn get_type_category_preferred( - typid: Oid, - typcategory: *mut ::std::os::raw::c_char, - typispreferred: *mut bool, - ); + pub fn point_dt(pt1: *mut Point, pt2: *mut Point) -> float8; } #[pg_guard] extern "C" { - pub fn get_typ_typrelid(typid: Oid) -> Oid; + pub fn point_sl(pt1: *mut Point, pt2: *mut Point) -> float8; } #[pg_guard] extern "C" { - pub fn get_element_type(typid: Oid) -> Oid; + pub fn pg_hypot(x: float8, y: float8) -> float8; } #[pg_guard] extern "C" { - pub fn get_array_type(typid: Oid) -> Oid; + pub fn box_copy(box_: *mut BOX) -> *mut BOX; } #[pg_guard] extern "C" { - pub fn get_promoted_array_type(typid: Oid) -> Oid; + pub fn escape_json(buf: StringInfo, str_: *const ::std::os::raw::c_char); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NumericData { + _unused: [u8; 0], } +pub type Numeric = *mut NumericData; #[pg_guard] extern "C" { - pub fn get_base_element_type(typid: Oid) -> Oid; + pub fn numeric_is_nan(num: Numeric) -> bool; } #[pg_guard] extern "C" { - pub fn getTypeInputInfo(type_: Oid, typInput: *mut Oid, typIOParam: *mut Oid); + pub fn numeric_maximum_size(typmod: int32) -> int32; } #[pg_guard] extern "C" { - pub fn getTypeOutputInfo(type_: Oid, typOutput: *mut Oid, typIsVarlena: *mut bool); + pub fn numeric_out_sci( + num: Numeric, + scale: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +#[pg_guard] +extern "C" { + pub fn numeric_normalize(num: Numeric) -> *mut ::std::os::raw::c_char; +} +pub const JsonbIteratorToken_WJB_DONE: JsonbIteratorToken = 0; +pub const JsonbIteratorToken_WJB_KEY: JsonbIteratorToken = 1; +pub const JsonbIteratorToken_WJB_VALUE: JsonbIteratorToken = 2; +pub const JsonbIteratorToken_WJB_ELEM: JsonbIteratorToken = 3; +pub const JsonbIteratorToken_WJB_BEGIN_ARRAY: JsonbIteratorToken = 4; +pub const JsonbIteratorToken_WJB_END_ARRAY: JsonbIteratorToken = 5; +pub const JsonbIteratorToken_WJB_BEGIN_OBJECT: JsonbIteratorToken = 6; +pub const JsonbIteratorToken_WJB_END_OBJECT: JsonbIteratorToken = 7; +pub type JsonbIteratorToken = ::std::os::raw::c_uint; +pub type JEntry = uint32; +#[repr(C)] +#[derive(Debug, Default)] +pub struct JsonbContainer { + pub header: uint32, + pub children: __IncompleteArrayField, +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct Jsonb { + pub vl_len_: int32, + pub root: JsonbContainer, +} +pub const jbvType_jbvNull: jbvType = 0; +pub const jbvType_jbvString: jbvType = 1; +pub const jbvType_jbvNumeric: jbvType = 2; +pub const jbvType_jbvBool: jbvType = 3; +pub const jbvType_jbvArray: jbvType = 16; +pub const jbvType_jbvObject: jbvType = 17; +pub const jbvType_jbvBinary: jbvType = 18; +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, + _bindgen_union_align: [u64; 3usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct JsonbValue__bindgen_ty_1__bindgen_ty_1 { + pub len: ::std::os::raw::c_int, + pub val: *mut ::std::os::raw::c_char, +} +impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct JsonbValue__bindgen_ty_1__bindgen_ty_2 { + pub nElems: ::std::os::raw::c_int, + pub elems: *mut JsonbValue, + pub rawScalar: bool, +} +impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_2 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct JsonbValue__bindgen_ty_1__bindgen_ty_3 { + pub nPairs: ::std::os::raw::c_int, + pub pairs: *mut JsonbPair, +} +impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_3 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct JsonbValue__bindgen_ty_1__bindgen_ty_4 { + pub len: ::std::os::raw::c_int, + pub data: *mut JsonbContainer, +} +impl Default for JsonbValue__bindgen_ty_1__bindgen_ty_4 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl Default for JsonbValue__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl Default for JsonbValue { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct JsonbPair { + pub key: JsonbValue, + pub value: JsonbValue, + pub order: uint32, } -#[pg_guard] -extern "C" { - pub fn getTypeBinaryInputInfo(type_: Oid, typReceive: *mut Oid, typIOParam: *mut Oid); +impl Default for JsonbPair { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn getTypeBinaryOutputInfo(type_: Oid, typSend: *mut Oid, typIsVarlena: *mut bool); +#[repr(C)] +#[derive(Copy, Clone)] +pub struct JsonbParseState { + pub contVal: JsonbValue, + pub size: Size, + pub next: *mut JsonbParseState, } -#[pg_guard] -extern "C" { - pub fn get_typmodin(typid: Oid) -> Oid; +impl Default for JsonbParseState { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn get_typcollation(typid: Oid) -> Oid; +pub const JsonbIterState_JBI_ARRAY_START: JsonbIterState = 0; +pub const JsonbIterState_JBI_ARRAY_ELEM: JsonbIterState = 1; +pub const JsonbIterState_JBI_OBJECT_START: JsonbIterState = 2; +pub const JsonbIterState_JBI_OBJECT_KEY: JsonbIterState = 3; +pub const JsonbIterState_JBI_OBJECT_VALUE: JsonbIterState = 4; +pub type JsonbIterState = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct JsonbIterator { + pub container: *mut JsonbContainer, + pub nElems: uint32, + pub isScalar: bool, + pub children: *mut JEntry, + pub dataProper: *mut ::std::os::raw::c_char, + pub curIndex: ::std::os::raw::c_int, + pub curDataOffset: uint32, + pub curValueOffset: uint32, + pub state: JsonbIterState, + pub parent: *mut JsonbIterator, } -#[pg_guard] -extern "C" { - pub fn type_is_collatable(typid: Oid) -> bool; +impl Default for JsonbIterator { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } #[pg_guard] extern "C" { - pub fn getBaseType(typid: Oid) -> Oid; + pub fn getJsonbOffset(jc: *const JsonbContainer, index: ::std::os::raw::c_int) -> uint32; } #[pg_guard] extern "C" { - pub fn getBaseTypeAndTypmod(typid: Oid, typmod: *mut int32) -> Oid; + pub fn getJsonbLength(jc: *const JsonbContainer, index: ::std::os::raw::c_int) -> uint32; } #[pg_guard] extern "C" { - pub fn get_typavgwidth(typid: Oid, typmod: int32) -> int32; + pub fn compareJsonbContainers( + a: *mut JsonbContainer, + b: *mut JsonbContainer, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn get_attavgwidth(relid: Oid, attnum: AttrNumber) -> int32; + pub fn findJsonbValueFromContainer( + sheader: *mut JsonbContainer, + flags: uint32, + key: *mut JsonbValue, + ) -> *mut JsonbValue; } #[pg_guard] extern "C" { - pub fn get_attstatsslot( - sslot: *mut AttStatsSlot, - statstuple: HeapTuple, - reqkind: ::std::os::raw::c_int, - reqop: Oid, - flags: ::std::os::raw::c_int, - ) -> bool; + pub fn getIthJsonbValueFromContainer( + sheader: *mut JsonbContainer, + i: uint32, + ) -> *mut JsonbValue; } #[pg_guard] extern "C" { - pub fn free_attstatsslot(sslot: *mut AttStatsSlot); + pub fn pushJsonbValue( + pstate: *mut *mut JsonbParseState, + seq: JsonbIteratorToken, + jbVal: *mut JsonbValue, + ) -> *mut JsonbValue; } #[pg_guard] extern "C" { - pub fn get_namespace_name(nspid: Oid) -> *mut ::std::os::raw::c_char; + pub fn JsonbIteratorInit(container: *mut JsonbContainer) -> *mut JsonbIterator; } #[pg_guard] extern "C" { - pub fn get_namespace_name_or_temp(nspid: Oid) -> *mut ::std::os::raw::c_char; + pub fn JsonbIteratorNext( + it: *mut *mut JsonbIterator, + val: *mut JsonbValue, + skipNested: bool, + ) -> JsonbIteratorToken; } #[pg_guard] extern "C" { - pub fn get_range_subtype(rangeOid: Oid) -> Oid; + pub fn JsonbValueToJsonb(val: *mut JsonbValue) -> *mut Jsonb; } #[pg_guard] extern "C" { - pub fn get_range_collation(rangeOid: Oid) -> Oid; + pub fn JsonbDeepContains( + val: *mut *mut JsonbIterator, + mContained: *mut *mut JsonbIterator, + ) -> bool; } #[pg_guard] extern "C" { - pub fn get_index_isreplident(index_oid: Oid) -> bool; + pub fn JsonbHashScalarValue(scalarVal: *const JsonbValue, hash: *mut uint32); } #[pg_guard] extern "C" { - pub fn get_index_isclustered(index_oid: Oid) -> bool; + pub fn JsonbHashScalarValueExtended( + scalarVal: *const JsonbValue, + hash: *mut uint64, + seed: uint64, + ); } #[pg_guard] extern "C" { - pub fn XLogBeginInsert(); + pub fn JsonbToCString( + out: StringInfo, + in_: *mut JsonbContainer, + estimated_len: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogSetRecordFlags(flags: uint8); + pub fn JsonbToCStringIndent( + out: StringInfo, + in_: *mut JsonbContainer, + estimated_len: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -#[pg_guard] -extern "C" { - pub fn XLogInsert(rmid: RmgrId, info: uint8) -> XLogRecPtr; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct OpBtreeInterpretation { + pub opfamily_id: Oid, + pub strategy: ::std::os::raw::c_int, + pub oplefttype: Oid, + pub oprighttype: Oid, } -#[pg_guard] -extern "C" { - pub fn XLogEnsureRecordSpace(nbuffers: ::std::os::raw::c_int, ndatas: ::std::os::raw::c_int); +pub const IOFuncSelector_IOFunc_input: IOFuncSelector = 0; +pub const IOFuncSelector_IOFunc_output: IOFuncSelector = 1; +pub const IOFuncSelector_IOFunc_receive: IOFuncSelector = 2; +pub const IOFuncSelector_IOFunc_send: IOFuncSelector = 3; +pub type IOFuncSelector = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AttStatsSlot { + pub staop: Oid, + pub valuetype: Oid, + pub values: *mut Datum, + pub nvalues: ::std::os::raw::c_int, + pub numbers: *mut float4, + pub nnumbers: ::std::os::raw::c_int, + pub values_arr: *mut ::std::os::raw::c_void, + pub numbers_arr: *mut ::std::os::raw::c_void, } -#[pg_guard] -extern "C" { - pub fn XLogRegisterData(data: *mut ::std::os::raw::c_char, len: ::std::os::raw::c_int); +impl Default for AttStatsSlot { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } +pub type get_attavgwidth_hook_type = + ::std::option::Option int32>; #[pg_guard] extern "C" { - pub fn XLogRegisterBuffer(block_id: uint8, buffer: Buffer, flags: uint8); + pub static mut get_attavgwidth_hook: get_attavgwidth_hook_type; } #[pg_guard] extern "C" { - pub fn XLogRegisterBlock( - block_id: uint8, - rnode: *mut RelFileNode, - forknum: ForkNumber, - blknum: BlockNumber, - page: *mut ::std::os::raw::c_char, - flags: uint8, - ); + pub fn op_in_opfamily(opno: Oid, opfamily: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn XLogRegisterBufData( - block_id: uint8, - data: *mut ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - ); + pub fn get_op_opfamily_strategy(opno: Oid, opfamily: Oid) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn XLogResetInsertion(); + pub fn get_op_opfamily_sortfamily(opno: Oid, opfamily: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn XLogCheckBufferNeedsBackup(buffer: Buffer) -> bool; + pub fn get_op_opfamily_properties( + opno: Oid, + opfamily: Oid, + ordering_op: bool, + strategy: *mut ::std::os::raw::c_int, + lefttype: *mut Oid, + righttype: *mut Oid, + ); } #[pg_guard] extern "C" { - pub fn log_newpage( - rnode: *mut RelFileNode, - forkNum: ForkNumber, - blk: BlockNumber, - page: *mut ::std::os::raw::c_char, - page_std: bool, - ) -> XLogRecPtr; + pub fn get_opfamily_member( + opfamily: Oid, + lefttype: Oid, + righttype: Oid, + strategy: int16, + ) -> Oid; } #[pg_guard] extern "C" { - pub fn log_newpage_buffer(buffer: Buffer, page_std: bool) -> XLogRecPtr; + pub fn get_ordering_op_properties( + opno: Oid, + opfamily: *mut Oid, + opcintype: *mut Oid, + strategy: *mut int16, + ) -> bool; } #[pg_guard] extern "C" { - pub fn log_newpage_range( - rel: Relation, - forkNum: ForkNumber, - startblk: BlockNumber, - endblk: BlockNumber, - page_std: bool, - ); + pub fn get_equality_op_for_ordering_op(opno: Oid, reverse: *mut bool) -> Oid; } #[pg_guard] extern "C" { - pub fn XLogSaveBufferForHint(buffer: Buffer, buffer_std: bool) -> XLogRecPtr; + pub fn get_ordering_op_for_equality_op(opno: Oid, use_lhs_type: bool) -> Oid; } #[pg_guard] extern "C" { - pub fn InitXLogInsert(); + pub fn get_mergejoin_opfamilies(opno: Oid) -> *mut List; } #[pg_guard] extern "C" { - pub static mut sync_method: ::std::os::raw::c_int; + pub fn get_compatible_hash_operators(opno: Oid, lhs_opno: *mut Oid, rhs_opno: *mut Oid) + -> bool; } #[pg_guard] extern "C" { - pub static mut ThisTimeLineID: TimeLineID; + pub fn get_op_hash_functions( + opno: Oid, + lhs_procno: *mut RegProcedure, + rhs_procno: *mut RegProcedure, + ) -> bool; } #[pg_guard] extern "C" { - pub static mut InRecovery: bool; + pub fn get_op_btree_interpretation(opno: Oid) -> *mut List; } -pub const HotStandbyState_STANDBY_DISABLED: HotStandbyState = 0; -pub const HotStandbyState_STANDBY_INITIALIZED: HotStandbyState = 1; -pub const HotStandbyState_STANDBY_SNAPSHOT_PENDING: HotStandbyState = 2; -pub const HotStandbyState_STANDBY_SNAPSHOT_READY: HotStandbyState = 3; -pub type HotStandbyState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut standbyState: HotStandbyState; + pub fn equality_ops_are_compatible(opno1: Oid, opno2: Oid) -> bool; } -pub const RecoveryTargetType_RECOVERY_TARGET_UNSET: RecoveryTargetType = 0; -pub const RecoveryTargetType_RECOVERY_TARGET_XID: RecoveryTargetType = 1; -pub const RecoveryTargetType_RECOVERY_TARGET_TIME: RecoveryTargetType = 2; -pub const RecoveryTargetType_RECOVERY_TARGET_NAME: RecoveryTargetType = 3; -pub const RecoveryTargetType_RECOVERY_TARGET_LSN: RecoveryTargetType = 4; -pub const RecoveryTargetType_RECOVERY_TARGET_IMMEDIATE: RecoveryTargetType = 5; -pub type RecoveryTargetType = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut ProcLastRecPtr: XLogRecPtr; + pub fn get_opfamily_proc(opfamily: Oid, lefttype: Oid, righttype: Oid, procnum: int16) -> Oid; } #[pg_guard] extern "C" { - pub static mut XactLastRecEnd: XLogRecPtr; + pub fn get_attname( + relid: Oid, + attnum: AttrNumber, + missing_ok: bool, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut XactLastCommitEnd: XLogRecPtr; + pub fn get_attnum(relid: Oid, attname: *const ::std::os::raw::c_char) -> AttrNumber; } #[pg_guard] extern "C" { - pub static mut reachedConsistency: bool; + pub fn get_attidentity(relid: Oid, attnum: AttrNumber) -> ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut wal_segment_size: ::std::os::raw::c_int; + pub fn get_atttype(relid: Oid, attnum: AttrNumber) -> Oid; } #[pg_guard] extern "C" { - pub static mut min_wal_size_mb: ::std::os::raw::c_int; + pub fn get_atttypmod(relid: Oid, attnum: AttrNumber) -> int32; } #[pg_guard] extern "C" { - pub static mut max_wal_size_mb: ::std::os::raw::c_int; + pub fn get_atttypetypmodcoll( + relid: Oid, + attnum: AttrNumber, + typid: *mut Oid, + typmod: *mut int32, + collid: *mut Oid, + ); } #[pg_guard] extern "C" { - pub static mut wal_keep_segments: ::std::os::raw::c_int; + pub fn get_collation_name(colloid: Oid) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut XLOGbuffers: ::std::os::raw::c_int; + pub fn get_constraint_name(conoid: Oid) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut XLogArchiveTimeout: ::std::os::raw::c_int; + pub fn get_language_name(langoid: Oid, missing_ok: bool) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut wal_retrieve_retry_interval: ::std::os::raw::c_int; + pub fn get_opclass_family(opclass: Oid) -> Oid; } #[pg_guard] extern "C" { - pub static mut XLogArchiveCommand: *mut ::std::os::raw::c_char; + pub fn get_opclass_input_type(opclass: Oid) -> Oid; } #[pg_guard] extern "C" { - pub static mut EnableHotStandby: bool; + pub fn get_opcode(opno: Oid) -> RegProcedure; } #[pg_guard] extern "C" { - pub static mut fullPageWrites: bool; + pub fn get_opname(opno: Oid) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut wal_log_hints: bool; + pub fn get_op_rettype(opno: Oid) -> Oid; } #[pg_guard] extern "C" { - pub static mut wal_compression: bool; + pub fn op_input_types(opno: Oid, lefttype: *mut Oid, righttype: *mut Oid); } #[pg_guard] extern "C" { - pub static mut wal_consistency_checking: *mut bool; + pub fn op_mergejoinable(opno: Oid, inputtype: Oid) -> bool; } #[pg_guard] extern "C" { - pub static mut wal_consistency_checking_string: *mut ::std::os::raw::c_char; + pub fn op_hashjoinable(opno: Oid, inputtype: Oid) -> bool; } #[pg_guard] extern "C" { - pub static mut log_checkpoints: bool; + pub fn op_strict(opno: Oid) -> bool; } #[pg_guard] extern "C" { - pub static mut CheckPointSegments: ::std::os::raw::c_int; + pub fn op_volatile(opno: Oid) -> ::std::os::raw::c_char; } -pub const ArchiveMode_ARCHIVE_MODE_OFF: ArchiveMode = 0; -pub const ArchiveMode_ARCHIVE_MODE_ON: ArchiveMode = 1; -pub const ArchiveMode_ARCHIVE_MODE_ALWAYS: ArchiveMode = 2; -pub type ArchiveMode = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut XLogArchiveMode: ::std::os::raw::c_int; + pub fn get_commutator(opno: Oid) -> Oid; } -pub const WalLevel_WAL_LEVEL_MINIMAL: WalLevel = 0; -pub const WalLevel_WAL_LEVEL_REPLICA: WalLevel = 1; -pub const WalLevel_WAL_LEVEL_LOGICAL: WalLevel = 2; -pub type WalLevel = ::std::os::raw::c_uint; -pub const RecoveryState_RECOVERY_STATE_CRASH: RecoveryState = 0; -pub const RecoveryState_RECOVERY_STATE_ARCHIVE: RecoveryState = 1; -pub const RecoveryState_RECOVERY_STATE_DONE: RecoveryState = 2; -pub type RecoveryState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut wal_level: ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct CheckpointStatsData { - pub ckpt_start_t: TimestampTz, - pub ckpt_write_t: TimestampTz, - pub ckpt_sync_t: TimestampTz, - pub ckpt_sync_end_t: TimestampTz, - pub ckpt_end_t: TimestampTz, - pub ckpt_bufs_written: ::std::os::raw::c_int, - pub ckpt_segs_added: ::std::os::raw::c_int, - pub ckpt_segs_removed: ::std::os::raw::c_int, - pub ckpt_segs_recycled: ::std::os::raw::c_int, - pub ckpt_sync_rels: ::std::os::raw::c_int, - pub ckpt_longest_sync: uint64, - pub ckpt_agg_sync_time: uint64, + pub fn get_negator(opno: Oid) -> Oid; } #[pg_guard] extern "C" { - pub static mut CheckpointStats: CheckpointStatsData; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XLogRecData { - _unused: [u8; 0], + pub fn get_oprrest(opno: Oid) -> RegProcedure; } #[pg_guard] extern "C" { - pub fn XLogInsertRecord( - rdata: *mut XLogRecData, - fpw_lsn: XLogRecPtr, - flags: uint8, - ) -> XLogRecPtr; + pub fn get_oprjoin(opno: Oid) -> RegProcedure; } #[pg_guard] extern "C" { - pub fn XLogFlush(RecPtr: XLogRecPtr); + pub fn get_func_name(funcid: Oid) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogBackgroundFlush() -> bool; + pub fn get_func_namespace(funcid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn XLogNeedsFlush(RecPtr: XLogRecPtr) -> bool; + pub fn get_func_rettype(funcid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn XLogFileInit( - segno: XLogSegNo, - use_existent: *mut bool, - use_lock: bool, - ) -> ::std::os::raw::c_int; + pub fn get_func_nargs(funcid: Oid) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn XLogFileOpen(segno: XLogSegNo) -> ::std::os::raw::c_int; + pub fn get_func_signature( + funcid: Oid, + argtypes: *mut *mut Oid, + nargs: *mut ::std::os::raw::c_int, + ) -> Oid; } #[pg_guard] extern "C" { - pub fn CheckXLogRemoved(segno: XLogSegNo, tli: TimeLineID); + pub fn get_func_variadictype(funcid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn XLogGetLastRemovedSegno() -> XLogSegNo; + pub fn get_func_retset(funcid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn XLogSetAsyncXactLSN(record: XLogRecPtr); + pub fn func_strict(funcid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn XLogSetReplicationSlotMinimumLSN(lsn: XLogRecPtr); + pub fn func_volatile(funcid: Oid) -> ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn xlog_redo(record: *mut XLogReaderState); + pub fn func_parallel(funcid: Oid) -> ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn xlog_desc(buf: StringInfo, record: *mut XLogReaderState); + pub fn get_func_prokind(funcid: Oid) -> ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn xlog_identify(info: uint8) -> *const ::std::os::raw::c_char; + pub fn get_func_leakproof(funcid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn issue_xlog_fsync(fd: ::std::os::raw::c_int, segno: XLogSegNo); + pub fn get_func_cost(funcid: Oid) -> float4; } #[pg_guard] extern "C" { - pub fn RecoveryInProgress() -> bool; + pub fn get_func_rows(funcid: Oid) -> float4; } #[pg_guard] extern "C" { - pub fn GetRecoveryState() -> RecoveryState; + pub fn get_relname_relid(relname: *const ::std::os::raw::c_char, relnamespace: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn HotStandbyActive() -> bool; + pub fn get_rel_name(relid: Oid) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn HotStandbyActiveInReplay() -> bool; + pub fn get_rel_namespace(relid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn XLogInsertAllowed() -> bool; + pub fn get_rel_type_id(relid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn GetXLogReceiptTime(rtime: *mut TimestampTz, fromStream: *mut bool); + pub fn get_rel_relkind(relid: Oid) -> ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn GetXLogReplayRecPtr(replayTLI: *mut TimeLineID) -> XLogRecPtr; + pub fn get_rel_relispartition(relid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn GetXLogInsertRecPtr() -> XLogRecPtr; + pub fn get_rel_tablespace(relid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn GetXLogWriteRecPtr() -> XLogRecPtr; + pub fn get_rel_persistence(relid: Oid) -> ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn RecoveryIsPaused() -> bool; + pub fn get_transform_fromsql(typid: Oid, langid: Oid, trftypes: *mut List) -> Oid; } #[pg_guard] extern "C" { - pub fn SetRecoveryPause(recoveryPause: bool); + pub fn get_transform_tosql(typid: Oid, langid: Oid, trftypes: *mut List) -> Oid; } #[pg_guard] extern "C" { - pub fn GetLatestXTime() -> TimestampTz; + pub fn get_typisdefined(typid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn GetCurrentChunkReplayStartTime() -> TimestampTz; + pub fn get_typlen(typid: Oid) -> int16; } #[pg_guard] extern "C" { - pub fn XLogFileNameP(tli: TimeLineID, segno: XLogSegNo) -> *mut ::std::os::raw::c_char; + pub fn get_typbyval(typid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn UpdateControlFile(); + pub fn get_typlenbyval(typid: Oid, typlen: *mut int16, typbyval: *mut bool); } #[pg_guard] extern "C" { - pub fn GetSystemIdentifier() -> uint64; + pub fn get_typlenbyvalalign( + typid: Oid, + typlen: *mut int16, + typbyval: *mut bool, + typalign: *mut ::std::os::raw::c_char, + ); } #[pg_guard] extern "C" { - pub fn GetMockAuthenticationNonce() -> *mut ::std::os::raw::c_char; + pub fn getTypeIOParam(typeTuple: HeapTuple) -> Oid; } #[pg_guard] extern "C" { - pub fn DataChecksumsEnabled() -> bool; + pub fn get_type_io_data( + typid: Oid, + which_func: IOFuncSelector, + typlen: *mut int16, + typbyval: *mut bool, + typalign: *mut ::std::os::raw::c_char, + typdelim: *mut ::std::os::raw::c_char, + typioparam: *mut Oid, + func: *mut Oid, + ); } #[pg_guard] extern "C" { - pub fn GetFakeLSNForUnloggedRel() -> XLogRecPtr; + pub fn get_typstorage(typid: Oid) -> ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLOGShmemSize() -> Size; + pub fn get_typdefault(typid: Oid) -> *mut Node; } #[pg_guard] extern "C" { - pub fn XLOGShmemInit(); + pub fn get_typtype(typid: Oid) -> ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn BootStrapXLOG(); + pub fn type_is_rowtype(typid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn LocalProcessControlFile(reset: bool); + pub fn type_is_enum(typid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn StartupXLOG(); + pub fn type_is_range(typid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn ShutdownXLOG(code: ::std::os::raw::c_int, arg: Datum); + pub fn get_type_category_preferred( + typid: Oid, + typcategory: *mut ::std::os::raw::c_char, + typispreferred: *mut bool, + ); } #[pg_guard] extern "C" { - pub fn InitXLOGAccess(); + pub fn get_typ_typrelid(typid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn CreateCheckPoint(flags: ::std::os::raw::c_int); + pub fn get_element_type(typid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn CreateRestartPoint(flags: ::std::os::raw::c_int) -> bool; + pub fn get_array_type(typid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn XLogPutNextOid(nextOid: Oid); + pub fn get_promoted_array_type(typid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn XLogRestorePoint(rpName: *const ::std::os::raw::c_char) -> XLogRecPtr; + pub fn get_base_element_type(typid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn UpdateFullPageWrites(); + pub fn getTypeInputInfo(type_: Oid, typInput: *mut Oid, typIOParam: *mut Oid); } #[pg_guard] extern "C" { - pub fn GetFullPageWriteInfo(RedoRecPtr_p: *mut XLogRecPtr, doPageWrites_p: *mut bool); + pub fn getTypeOutputInfo(type_: Oid, typOutput: *mut Oid, typIsVarlena: *mut bool); } #[pg_guard] extern "C" { - pub fn GetRedoRecPtr() -> XLogRecPtr; + pub fn getTypeBinaryInputInfo(type_: Oid, typReceive: *mut Oid, typIOParam: *mut Oid); } #[pg_guard] extern "C" { - pub fn GetInsertRecPtr() -> XLogRecPtr; + pub fn getTypeBinaryOutputInfo(type_: Oid, typSend: *mut Oid, typIsVarlena: *mut bool); } #[pg_guard] extern "C" { - pub fn GetFlushRecPtr() -> XLogRecPtr; + pub fn get_typmodin(typid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn GetLastImportantRecPtr() -> XLogRecPtr; + pub fn get_typcollation(typid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn GetNextXidAndEpoch(xid: *mut TransactionId, epoch: *mut uint32); + pub fn type_is_collatable(typid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn RemovePromoteSignalFiles(); + pub fn getBaseType(typid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn CheckPromoteSignal() -> bool; + pub fn getBaseTypeAndTypmod(typid: Oid, typmod: *mut int32) -> Oid; } #[pg_guard] extern "C" { - pub fn WakeupRecovery(); + pub fn get_typavgwidth(typid: Oid, typmod: int32) -> int32; } #[pg_guard] extern "C" { - pub fn SetWalWriterSleeping(sleeping: bool); + pub fn get_attavgwidth(relid: Oid, attnum: AttrNumber) -> int32; } #[pg_guard] extern "C" { - pub fn XLogRequestWalReceiverReply(); + pub fn get_attstatsslot( + sslot: *mut AttStatsSlot, + statstuple: HeapTuple, + reqkind: ::std::os::raw::c_int, + reqop: Oid, + flags: ::std::os::raw::c_int, + ) -> bool; } #[pg_guard] extern "C" { - pub fn assign_max_wal_size(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void); + pub fn free_attstatsslot(sslot: *mut AttStatsSlot); } #[pg_guard] extern "C" { - pub fn assign_checkpoint_completion_target(newval: f64, extra: *mut ::std::os::raw::c_void); + pub fn get_namespace_name(nspid: Oid) -> *mut ::std::os::raw::c_char; } -pub const SessionBackupState_SESSION_BACKUP_NONE: SessionBackupState = 0; -pub const SessionBackupState_SESSION_BACKUP_EXCLUSIVE: SessionBackupState = 1; -pub const SessionBackupState_SESSION_BACKUP_NON_EXCLUSIVE: SessionBackupState = 2; -pub type SessionBackupState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn do_pg_start_backup( - backupidstr: *const ::std::os::raw::c_char, - fast: bool, - starttli_p: *mut TimeLineID, - labelfile: StringInfo, - tablespaces: *mut *mut List, - tblspcmapfile: StringInfo, - infotbssize: bool, - needtblspcmapfile: bool, - ) -> XLogRecPtr; + pub fn get_namespace_name_or_temp(nspid: Oid) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn do_pg_stop_backup( - labelfile: *mut ::std::os::raw::c_char, - waitforarchive: bool, - stoptli_p: *mut TimeLineID, - ) -> XLogRecPtr; + pub fn get_range_subtype(rangeOid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn do_pg_abort_backup(code: ::std::os::raw::c_int, arg: Datum); + pub fn get_range_collation(rangeOid: Oid) -> Oid; } #[pg_guard] extern "C" { - pub fn register_persistent_abort_backup_handler(); + pub fn get_index_isreplident(index_oid: Oid) -> bool; } #[pg_guard] extern "C" { - pub fn get_backup_status() -> SessionBackupState; + pub fn get_index_isclustered(index_oid: Oid) -> bool; } #[repr(C)] #[derive(Debug, Default)] diff --git a/pgx-pg-sys/src/pg12.rs b/pgx-pg-sys/src/pg12.rs index 1a18f3237..b53de1228 100644 --- a/pgx-pg-sys/src/pg12.rs +++ b/pgx-pg-sys/src/pg12.rs @@ -377,8 +377,8 @@ pub const PG_CACHE_LINE_SIZE: u32 = 128; pub const TRACE_SORT: u32 = 1; pub const __darwin__: u32 = 1; pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 0; -pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1; +pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_UNIX03: u32 = 1; pub const __DARWIN_64_BIT_INO_T: u32 = 1; pub const __DARWIN_VERS_1050: u32 = 1; @@ -423,9 +423,13 @@ pub const __MAC_10_13_4: u32 = 101304; pub const __MAC_10_14: u32 = 101400; pub const __MAC_10_14_1: u32 = 101401; pub const __MAC_10_14_4: u32 = 101404; +pub const __MAC_10_14_6: u32 = 101406; pub const __MAC_10_15: u32 = 101500; pub const __MAC_10_15_1: u32 = 101501; pub const __MAC_10_15_4: u32 = 101504; +pub const __MAC_10_16: u32 = 101600; +pub const __MAC_11_0: u32 = 110000; +pub const __MAC_11_1: u32 = 110100; pub const __IPHONE_2_0: u32 = 20000; pub const __IPHONE_2_1: u32 = 20100; pub const __IPHONE_2_2: u32 = 20200; @@ -464,6 +468,7 @@ pub const __IPHONE_12_0: u32 = 120000; pub const __IPHONE_12_1: u32 = 120100; pub const __IPHONE_12_2: u32 = 120200; pub const __IPHONE_12_3: u32 = 120300; +pub const __IPHONE_12_4: u32 = 120400; pub const __IPHONE_13_0: u32 = 130000; pub const __IPHONE_13_1: u32 = 130100; pub const __IPHONE_13_2: u32 = 130200; @@ -471,6 +476,11 @@ pub const __IPHONE_13_3: u32 = 130300; pub const __IPHONE_13_4: u32 = 130400; pub const __IPHONE_13_5: u32 = 130500; pub const __IPHONE_13_6: u32 = 130600; +pub const __IPHONE_13_7: u32 = 130700; +pub const __IPHONE_14_0: u32 = 140000; +pub const __IPHONE_14_1: u32 = 140100; +pub const __IPHONE_14_2: u32 = 140200; +pub const __IPHONE_14_3: u32 = 140300; pub const __TVOS_9_0: u32 = 90000; pub const __TVOS_9_1: u32 = 90100; pub const __TVOS_9_2: u32 = 90200; @@ -487,10 +497,15 @@ pub const __TVOS_12_0: u32 = 120000; pub const __TVOS_12_1: u32 = 120100; pub const __TVOS_12_2: u32 = 120200; pub const __TVOS_12_3: u32 = 120300; +pub const __TVOS_12_4: u32 = 120400; pub const __TVOS_13_0: u32 = 130000; pub const __TVOS_13_2: u32 = 130200; pub const __TVOS_13_3: u32 = 130300; pub const __TVOS_13_4: u32 = 130400; +pub const __TVOS_14_0: u32 = 140000; +pub const __TVOS_14_1: u32 = 140100; +pub const __TVOS_14_2: u32 = 140200; +pub const __TVOS_14_3: u32 = 140300; pub const __WATCHOS_1_0: u32 = 10000; pub const __WATCHOS_2_0: u32 = 20000; pub const __WATCHOS_2_1: u32 = 20100; @@ -506,11 +521,49 @@ pub const __WATCHOS_4_3: u32 = 40300; pub const __WATCHOS_5_0: u32 = 50000; pub const __WATCHOS_5_1: u32 = 50100; pub const __WATCHOS_5_2: u32 = 50200; +pub const __WATCHOS_5_3: u32 = 50300; pub const __WATCHOS_6_0: u32 = 60000; pub const __WATCHOS_6_1: u32 = 60100; pub const __WATCHOS_6_2: u32 = 60200; +pub const __WATCHOS_7_0: u32 = 70000; +pub const __WATCHOS_7_1: u32 = 70100; +pub const __WATCHOS_7_2: u32 = 70200; +pub const MAC_OS_X_VERSION_10_0: u32 = 1000; +pub const MAC_OS_X_VERSION_10_1: u32 = 1010; +pub const MAC_OS_X_VERSION_10_2: u32 = 1020; +pub const MAC_OS_X_VERSION_10_3: u32 = 1030; +pub const MAC_OS_X_VERSION_10_4: u32 = 1040; +pub const MAC_OS_X_VERSION_10_5: u32 = 1050; +pub const MAC_OS_X_VERSION_10_6: u32 = 1060; +pub const MAC_OS_X_VERSION_10_7: u32 = 1070; +pub const MAC_OS_X_VERSION_10_8: u32 = 1080; +pub const MAC_OS_X_VERSION_10_9: u32 = 1090; +pub const MAC_OS_X_VERSION_10_10: u32 = 101000; +pub const MAC_OS_X_VERSION_10_10_2: u32 = 101002; +pub const MAC_OS_X_VERSION_10_10_3: u32 = 101003; +pub const MAC_OS_X_VERSION_10_11: u32 = 101100; +pub const MAC_OS_X_VERSION_10_11_2: u32 = 101102; +pub const MAC_OS_X_VERSION_10_11_3: u32 = 101103; +pub const MAC_OS_X_VERSION_10_11_4: u32 = 101104; +pub const MAC_OS_X_VERSION_10_12: u32 = 101200; +pub const MAC_OS_X_VERSION_10_12_1: u32 = 101201; +pub const MAC_OS_X_VERSION_10_12_2: u32 = 101202; +pub const MAC_OS_X_VERSION_10_12_4: u32 = 101204; +pub const MAC_OS_X_VERSION_10_13: u32 = 101300; +pub const MAC_OS_X_VERSION_10_13_1: u32 = 101301; +pub const MAC_OS_X_VERSION_10_13_2: u32 = 101302; +pub const MAC_OS_X_VERSION_10_13_4: u32 = 101304; +pub const MAC_OS_X_VERSION_10_14: u32 = 101400; +pub const MAC_OS_X_VERSION_10_14_1: u32 = 101401; +pub const MAC_OS_X_VERSION_10_14_4: u32 = 101404; +pub const MAC_OS_X_VERSION_10_14_6: u32 = 101406; +pub const MAC_OS_X_VERSION_10_15: u32 = 101500; +pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501; +pub const MAC_OS_X_VERSION_10_16: u32 = 101600; +pub const MAC_OS_VERSION_11_0: u32 = 110000; pub const __DRIVERKIT_19_0: u32 = 190000; -pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 101500; +pub const __DRIVERKIT_20_0: u32 = 200000; +pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 110100; pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1; pub const __PTHREAD_SIZE__: u32 = 8176; pub const __PTHREAD_ATTR_SIZE__: u32 = 56; @@ -600,6 +653,9 @@ pub const FP_RND_DOWN: u32 = 1; pub const FP_RND_UP: u32 = 2; pub const FP_CHOP: u32 = 3; pub const FP_STATE_BYTES: u32 = 512; +pub const _X86_INSTRUCTION_STATE_MAX_INSN_BYTES: u32 = 2380; +pub const _X86_INSTRUCTION_STATE_CACHELINE_SIZE: u32 = 64; +pub const __LASTBRANCH_MAX: u32 = 32; pub const SIGEV_NONE: u32 = 0; pub const SIGEV_SIGNAL: u32 = 1; pub const SIGEV_THREAD: u32 = 3; @@ -733,7 +789,9 @@ pub const RUSAGE_INFO_V1: u32 = 1; pub const RUSAGE_INFO_V2: u32 = 2; pub const RUSAGE_INFO_V3: u32 = 3; pub const RUSAGE_INFO_V4: u32 = 4; -pub const RUSAGE_INFO_CURRENT: u32 = 4; +pub const RUSAGE_INFO_V5: u32 = 5; +pub const RUSAGE_INFO_CURRENT: u32 = 5; +pub const RU_PROC_RUNS_RESLIDE: u32 = 1; pub const RLIMIT_CPU: u32 = 0; pub const RLIMIT_FSIZE: u32 = 1; pub const RLIMIT_DATA: u32 = 2; @@ -761,6 +819,8 @@ pub const IOPOL_TYPE_DISK: u32 = 0; pub const IOPOL_TYPE_VFS_ATIME_UPDATES: u32 = 2; pub const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES: u32 = 3; pub const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME: u32 = 4; +pub const IOPOL_TYPE_VFS_TRIGGER_RESOLVE: u32 = 5; +pub const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION: u32 = 6; pub const IOPOL_SCOPE_PROCESS: u32 = 0; pub const IOPOL_SCOPE_THREAD: u32 = 1; pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2; @@ -779,6 +839,10 @@ pub const IOPOL_MATERIALIZE_DATALESS_FILES_OFF: u32 = 1; pub const IOPOL_MATERIALIZE_DATALESS_FILES_ON: u32 = 2; pub const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT: u32 = 0; pub const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME: u32 = 1; +pub const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT: u32 = 0; +pub const IOPOL_VFS_TRIGGER_RESOLVE_OFF: u32 = 1; +pub const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT: u32 = 0; +pub const IOPOL_VFS_CONTENT_PROTECTION_IGNORE: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WCOREFLAG: u32 = 128; @@ -1131,7 +1195,8 @@ pub const pseudo_AF_HDRCMPLT: u32 = 35; pub const AF_RESERVED_36: u32 = 36; pub const AF_IEEE80211: u32 = 37; pub const AF_UTUN: u32 = 38; -pub const AF_MAX: u32 = 40; +pub const AF_VSOCK: u32 = 40; +pub const AF_MAX: u32 = 41; pub const SOCK_MAXADDRLEN: u32 = 255; pub const _SS_MAXSIZE: u32 = 128; pub const PF_UNSPEC: u32 = 0; @@ -1172,8 +1237,9 @@ pub const PF_NETBIOS: u32 = 33; pub const PF_PPP: u32 = 34; pub const PF_RESERVED_36: u32 = 36; pub const PF_UTUN: u32 = 38; -pub const PF_MAX: u32 = 40; -pub const NET_MAXID: u32 = 40; +pub const PF_VSOCK: u32 = 40; +pub const PF_MAX: u32 = 41; +pub const NET_MAXID: u32 = 41; pub const NET_RT_DUMP: u32 = 1; pub const NET_RT_FLAGS: u32 = 2; pub const NET_RT_IFLIST: u32 = 3; @@ -1200,6 +1266,7 @@ pub const MSG_SEND: u32 = 4096; pub const MSG_HAVEMORE: u32 = 8192; pub const MSG_RCVMORE: u32 = 16384; pub const MSG_NEEDSA: u32 = 65536; +pub const MSG_NOSIGNAL: u32 = 524288; pub const SCM_RIGHTS: u32 = 1; pub const SCM_TIMESTAMP: u32 = 2; pub const SCM_CREDS: u32 = 3; @@ -1364,6 +1431,7 @@ pub const IP_BOUND_IF: u32 = 25; pub const IP_PKTINFO: u32 = 26; pub const IP_RECVPKTINFO: u32 = 26; pub const IP_RECVTOS: u32 = 27; +pub const IP_DONTFRAG: u32 = 28; pub const IP_FW_ADD: u32 = 40; pub const IP_FW_DEL: u32 = 41; pub const IP_FW_FLUSH: u32 = 42; @@ -1437,6 +1505,9 @@ pub const __IPV6_ADDR_SCOPE_LINKLOCAL: u32 = 2; pub const __IPV6_ADDR_SCOPE_SITELOCAL: u32 = 5; pub const __IPV6_ADDR_SCOPE_ORGLOCAL: u32 = 8; pub const __IPV6_ADDR_SCOPE_GLOBAL: u32 = 14; +pub const IPV6_ADDR_MC_FLAGS_TRANSIENT: u32 = 16; +pub const IPV6_ADDR_MC_FLAGS_PREFIX: u32 = 32; +pub const IPV6_ADDR_MC_FLAGS_UNICAST_BASED: u32 = 48; pub const IPV6_SOCKOPT_RESERVED1: u32 = 3; pub const IPV6_UNICAST_HOPS: u32 = 4; pub const IPV6_MULTICAST_IF: u32 = 9; @@ -1722,6 +1793,13 @@ pub const O_NOFOLLOW: u32 = 256; pub const O_CREAT: u32 = 512; pub const O_TRUNC: u32 = 1024; pub const O_EXCL: u32 = 2048; +pub const O_EVTONLY: u32 = 32768; +pub const O_NOCTTY: u32 = 131072; +pub const O_DIRECTORY: u32 = 1048576; +pub const O_SYMLINK: u32 = 2097152; +pub const O_DSYNC: u32 = 4194304; +pub const O_CLOEXEC: u32 = 16777216; +pub const O_NOFOLLOW_ANY: u32 = 536870912; pub const AT_FDCWD: i32 = -2; pub const AT_EACCESS: u32 = 16; pub const AT_SYMLINK_NOFOLLOW: u32 = 32; @@ -1729,12 +1807,6 @@ pub const AT_SYMLINK_FOLLOW: u32 = 64; pub const AT_REMOVEDIR: u32 = 128; pub const AT_REALDEV: u32 = 512; pub const AT_FDONLY: u32 = 1024; -pub const O_EVTONLY: u32 = 32768; -pub const O_NOCTTY: u32 = 131072; -pub const O_DIRECTORY: u32 = 1048576; -pub const O_SYMLINK: u32 = 2097152; -pub const O_DSYNC: u32 = 4194304; -pub const O_CLOEXEC: u32 = 16777216; pub const O_DP_GETRAWENCRYPTED: u32 = 1; pub const O_DP_GETRAWUNENCRYPTED: u32 = 2; pub const FAPPEND: u32 = 8; @@ -1796,6 +1868,9 @@ pub const F_PUNCHHOLE: u32 = 99; pub const F_TRIM_ACTIVE_FILE: u32 = 100; pub const F_SPECULATIVE_READ: u32 = 101; pub const F_GETPATH_NOFIRMLINK: u32 = 102; +pub const F_ADDFILESIGS_INFO: u32 = 103; +pub const F_ADDFILESUPPL: u32 = 104; +pub const F_GETSIGSINFO: u32 = 105; pub const FCNTL_FS_SPECIFIC_BASE: u32 = 65536; pub const F_DUPFD_CLOEXEC: u32 = 67; pub const FD_CLOEXEC: u32 = 1; @@ -1836,6 +1911,8 @@ pub const F_ALLOCATECONTIG: u32 = 2; pub const F_ALLOCATEALL: u32 = 4; pub const F_PEOFPOSMODE: u32 = 3; pub const F_VOLPOSMODE: u32 = 4; +pub const USER_FSIGNATURES_CDHASH_LEN: u32 = 20; +pub const GETSIGSINFO_PLATFORM_BINARY: u32 = 1; pub const LOCK_SH: u32 = 1; pub const LOCK_EX: u32 = 2; pub const LOCK_NB: u32 = 4; @@ -2059,7 +2136,7 @@ pub const SIZE_T_MAX: i32 = -1; pub const UQUAD_MAX: i32 = -1; pub const QUAD_MAX: u64 = 9223372036854775807; pub const QUAD_MIN: i64 = -9223372036854775808; -pub const ARG_MAX: u32 = 262144; +pub const ARG_MAX: u32 = 1048576; pub const CHILD_MAX: u32 = 266; pub const GID_MAX: u32 = 2147483647; pub const LINK_MAX: u32 = 32767; @@ -2272,6 +2349,7 @@ pub const LOCAL_PEERPID: u32 = 2; pub const LOCAL_PEEREPID: u32 = 3; pub const LOCAL_PEERUUID: u32 = 4; pub const LOCAL_PEEREUUID: u32 = 5; +pub const LOCAL_PEERTOKEN: u32 = 6; pub const SM_DATABASE: u32 = 64; pub const SM_USER: u32 = 32; pub const SM_DATABASE_USER: u32 = 97; @@ -2393,35 +2471,20 @@ pub const SK_SEARCHARRAY: u32 = 32; pub const SK_SEARCHNULL: u32 = 64; pub const SK_SEARCHNOTNULL: u32 = 128; pub const SK_ORDER_BY: u32 = 256; -pub const EOH_HEADER_MAGIC: i32 = -1; -pub const EA_MAGIC: u32 = 689375833; -pub const MAX_KILOBYTES: u32 = 2147483647; -pub const PG_AUTOCONF_FILENAME: &'static [u8; 21usize] = b"postgresql.auto.conf\0"; -pub const GUC_QUALIFIER_SEPARATOR: u8 = 46u8; -pub const GUC_LIST_INPUT: u32 = 1; -pub const GUC_LIST_QUOTE: u32 = 2; -pub const GUC_NO_SHOW_ALL: u32 = 4; -pub const GUC_NO_RESET_ALL: u32 = 8; -pub const GUC_REPORT: u32 = 16; -pub const GUC_NOT_IN_SAMPLE: u32 = 32; -pub const GUC_DISALLOW_IN_FILE: u32 = 64; -pub const GUC_CUSTOM_PLACEHOLDER: u32 = 128; -pub const GUC_SUPERUSER_ONLY: u32 = 256; -pub const GUC_IS_NAME: u32 = 512; -pub const GUC_NOT_WHILE_SEC_REST: u32 = 1024; -pub const GUC_DISALLOW_IN_AUTO_FILE: u32 = 2048; -pub const GUC_UNIT_KB: u32 = 4096; -pub const GUC_UNIT_BLOCKS: u32 = 8192; -pub const GUC_UNIT_XBLOCKS: u32 = 12288; -pub const GUC_UNIT_MB: u32 = 16384; -pub const GUC_UNIT_BYTE: u32 = 32768; -pub const GUC_UNIT_MEMORY: u32 = 61440; -pub const GUC_UNIT_MS: u32 = 65536; -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_UNIT: u32 = 1044480; +pub const GIN_COMPARE_PROC: u32 = 1; +pub const GIN_EXTRACTVALUE_PROC: u32 = 2; +pub const GIN_EXTRACTQUERY_PROC: u32 = 3; +pub const GIN_CONSISTENT_PROC: u32 = 4; +pub const GIN_COMPARE_PARTIAL_PROC: u32 = 5; +pub const GIN_TRICONSISTENT_PROC: u32 = 6; +pub const GINNProcs: u32 = 6; +pub const GIN_SEARCH_MODE_DEFAULT: u32 = 0; +pub const GIN_SEARCH_MODE_INCLUDE_EMPTY: u32 = 1; +pub const GIN_SEARCH_MODE_ALL: u32 = 2; +pub const GIN_SEARCH_MODE_EVERYTHING: u32 = 3; +pub const GIN_FALSE: u32 = 0; +pub const GIN_TRUE: u32 = 1; +pub const GIN_MAYBE: u32 = 2; pub const XLR_NORMAL_MAX_BLOCK_ID: u32 = 4; pub const XLR_NORMAL_RDATAS: u32 = 20; pub const REGBUF_FORCE_IMAGE: u32 = 1; @@ -2453,6 +2516,51 @@ pub const TABLESPACE_MAP: &'static [u8; 15usize] = b"tablespace_map\0"; pub const TABLESPACE_MAP_OLD: &'static [u8; 19usize] = b"tablespace_map.old\0"; pub const PROMOTE_SIGNAL_FILE: &'static [u8; 8usize] = b"promote\0"; pub const FALLBACK_PROMOTE_SIGNAL_FILE: &'static [u8; 17usize] = b"fallback_promote\0"; +pub const GIST_CONSISTENT_PROC: u32 = 1; +pub const GIST_UNION_PROC: u32 = 2; +pub const GIST_COMPRESS_PROC: u32 = 3; +pub const GIST_DECOMPRESS_PROC: u32 = 4; +pub const GIST_PENALTY_PROC: u32 = 5; +pub const GIST_PICKSPLIT_PROC: u32 = 6; +pub const GIST_EQUAL_PROC: u32 = 7; +pub const GIST_DISTANCE_PROC: u32 = 8; +pub const GIST_FETCH_PROC: u32 = 9; +pub const GISTNProcs: u32 = 9; +pub const F_LEAF: u32 = 1; +pub const F_DELETED: u32 = 2; +pub const F_TUPLES_DELETED: u32 = 4; +pub const F_FOLLOW_RIGHT: u32 = 8; +pub const F_HAS_GARBAGE: u32 = 16; +pub const GIST_PAGE_ID: u32 = 65409; +pub const EOH_HEADER_MAGIC: i32 = -1; +pub const EA_MAGIC: u32 = 689375833; +pub const MAX_KILOBYTES: u32 = 2147483647; +pub const PG_AUTOCONF_FILENAME: &'static [u8; 21usize] = b"postgresql.auto.conf\0"; +pub const GUC_QUALIFIER_SEPARATOR: u8 = 46u8; +pub const GUC_LIST_INPUT: u32 = 1; +pub const GUC_LIST_QUOTE: u32 = 2; +pub const GUC_NO_SHOW_ALL: u32 = 4; +pub const GUC_NO_RESET_ALL: u32 = 8; +pub const GUC_REPORT: u32 = 16; +pub const GUC_NOT_IN_SAMPLE: u32 = 32; +pub const GUC_DISALLOW_IN_FILE: u32 = 64; +pub const GUC_CUSTOM_PLACEHOLDER: u32 = 128; +pub const GUC_SUPERUSER_ONLY: u32 = 256; +pub const GUC_IS_NAME: u32 = 512; +pub const GUC_NOT_WHILE_SEC_REST: u32 = 1024; +pub const GUC_DISALLOW_IN_AUTO_FILE: u32 = 2048; +pub const GUC_UNIT_KB: u32 = 4096; +pub const GUC_UNIT_BLOCKS: u32 = 8192; +pub const GUC_UNIT_XBLOCKS: u32 = 12288; +pub const GUC_UNIT_MB: u32 = 16384; +pub const GUC_UNIT_BYTE: u32 = 32768; +pub const GUC_UNIT_MEMORY: u32 = 61440; +pub const GUC_UNIT_MS: u32 = 65536; +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_UNIT: u32 = 1044480; pub const RelationRelationId: u32 = 1259; pub const RelationRelation_Rowtype_Id: u32 = 83; pub const Anum_pg_class_oid: u32 = 1; @@ -4726,6 +4834,182 @@ pub struct __darwin_x86_debug_state32 { pub __dr7: ::std::os::raw::c_uint, } #[repr(C)] +#[derive(Copy, Clone)] +pub struct __x86_instruction_state { + pub __insn_stream_valid_bytes: ::std::os::raw::c_int, + pub __insn_offset: ::std::os::raw::c_int, + pub __out_of_synch: ::std::os::raw::c_int, + pub __insn_bytes: [__uint8_t; 2380usize], + pub __insn_cacheline: [__uint8_t; 64usize], +} +impl Default for __x86_instruction_state { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __last_branch_record { + pub __from_ip: __uint64_t, + pub __to_ip: __uint64_t, + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_padding_0: u32, +} +impl __last_branch_record { + #[inline] + pub fn __mispredict(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___mispredict(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn __tsx_abort(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___tsx_abort(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn __in_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set___in_tsx(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn __cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 16u8) as u32) } + } + #[inline] + pub fn set___cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 16u8, val as u64) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 13u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + __mispredict: __uint32_t, + __tsx_abort: __uint32_t, + __in_tsx: __uint32_t, + __cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __mispredict: u32 = unsafe { ::std::mem::transmute(__mispredict) }; + __mispredict as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __tsx_abort: u32 = unsafe { ::std::mem::transmute(__tsx_abort) }; + __tsx_abort as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let __in_tsx: u32 = unsafe { ::std::mem::transmute(__in_tsx) }; + __in_tsx as u64 + }); + __bindgen_bitfield_unit.set(3usize, 16u8, { + let __cycle_count: u32 = unsafe { ::std::mem::transmute(__cycle_count) }; + __cycle_count as u64 + }); + __bindgen_bitfield_unit.set(19usize, 13u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __last_branch_state { + pub __lbr_count: ::std::os::raw::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __lbrs: [__last_branch_record; 32usize], +} +impl __last_branch_state { + #[inline] + pub fn __lbr_supported_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_tsx(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn __lbr_supported_cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + __lbr_supported_tsx: __uint32_t, + __lbr_supported_cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __lbr_supported_tsx: u32 = unsafe { ::std::mem::transmute(__lbr_supported_tsx) }; + __lbr_supported_tsx as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __lbr_supported_cycle_count: u32 = + unsafe { ::std::mem::transmute(__lbr_supported_cycle_count) }; + __lbr_supported_cycle_count as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct __x86_pagein_state { pub __pagein_error: ::std::os::raw::c_int, @@ -5456,7 +5740,48 @@ pub struct rusage_info_v4 { pub ri_interval_max_phys_footprint: u64, pub ri_runnable_time: u64, } -pub type rusage_info_current = rusage_info_v4; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct rusage_info_v5 { + pub ri_uuid: [u8; 16usize], + pub ri_user_time: u64, + pub ri_system_time: u64, + pub ri_pkg_idle_wkups: u64, + pub ri_interrupt_wkups: u64, + pub ri_pageins: u64, + pub ri_wired_size: u64, + pub ri_resident_size: u64, + pub ri_phys_footprint: u64, + pub ri_proc_start_abstime: u64, + pub ri_proc_exit_abstime: u64, + pub ri_child_user_time: u64, + pub ri_child_system_time: u64, + pub ri_child_pkg_idle_wkups: u64, + pub ri_child_interrupt_wkups: u64, + pub ri_child_pageins: u64, + pub ri_child_elapsed_abstime: u64, + pub ri_diskio_bytesread: u64, + pub ri_diskio_byteswritten: u64, + pub ri_cpu_time_qos_default: u64, + pub ri_cpu_time_qos_maintenance: u64, + pub ri_cpu_time_qos_background: u64, + pub ri_cpu_time_qos_utility: u64, + pub ri_cpu_time_qos_legacy: u64, + pub ri_cpu_time_qos_user_initiated: u64, + pub ri_cpu_time_qos_user_interactive: u64, + pub ri_billed_system_time: u64, + pub ri_serviced_system_time: u64, + pub ri_logical_writes: u64, + pub ri_lifetime_max_phys_footprint: u64, + pub ri_instructions: u64, + pub ri_cycles: u64, + pub ri_billed_energy: u64, + pub ri_serviced_energy: u64, + pub ri_interval_max_phys_footprint: u64, + pub ri_runnable_time: u64, + pub ri_flags: u64, +} +pub type rusage_info_current = rusage_info_v5; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct rlimit { @@ -6401,6 +6726,15 @@ extern "C" { ) -> *mut ::std::os::raw::c_void; } #[pg_guard] +extern "C" { + pub fn strtonum( + __numstr: *const ::std::os::raw::c_char, + __minval: ::std::os::raw::c_longlong, + __maxval: ::std::os::raw::c_longlong, + __errstrp: *mut *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_longlong; +} +#[pg_guard] extern "C" { pub fn strtoq( __str: *const ::std::os::raw::c_char, @@ -6739,6 +7073,14 @@ extern "C" { ) -> ::std::os::raw::c_int; } #[pg_guard] +extern "C" { + pub fn strsignal_r( + __sig: ::std::os::raw::c_int, + __strsignalbuf: *mut ::std::os::raw::c_char, + __buflen: usize, + ) -> ::std::os::raw::c_int; +} +#[pg_guard] extern "C" { pub fn bcmp( arg1: *const ::std::os::raw::c_void, @@ -11841,27 +12183,13 @@ pub struct radvisory { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct fcodeblobs { - pub f_cd_hash: *mut ::std::os::raw::c_void, - pub f_hash_size: usize, - pub f_cd_buffer: *mut ::std::os::raw::c_void, - pub f_cd_size: usize, - pub f_out_size: *mut ::std::os::raw::c_uint, - pub f_arch: ::std::os::raw::c_int, - pub __padding: ::std::os::raw::c_int, -} -impl Default for fcodeblobs { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type fcodeblobs_t = fcodeblobs; -#[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct fsignatures { pub fs_file_start: off_t, pub fs_blob_start: *mut ::std::os::raw::c_void, pub fs_blob_size: usize, + pub fs_fsignatures_size: usize, + pub fs_cdhash: [::std::os::raw::c_char; 20usize], + pub fs_hash_type: ::std::os::raw::c_int, } impl Default for fsignatures { fn default() -> Self { @@ -11870,6 +12198,15 @@ impl Default for fsignatures { } pub type fsignatures_t = fsignatures; #[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct fsupplement { + pub fs_file_start: off_t, + pub fs_blob_start: off_t, + pub fs_blob_size: usize, + pub fs_orig_fd: ::std::os::raw::c_int, +} +pub type fsupplement_t = fsupplement; +#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct fchecklv { pub lv_file_start: off_t, @@ -11884,6 +12221,14 @@ impl Default for fchecklv { pub type fchecklv_t = fchecklv; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] +pub struct fgetsigsinfo { + pub fg_file_start: off_t, + pub fg_info_request: ::std::os::raw::c_int, + pub fg_sig_is_platform: ::std::os::raw::c_int, +} +pub type fgetsigsinfo_t = fgetsigsinfo; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] pub struct fstore { pub fst_flags: ::std::os::raw::c_uint, pub fst_posmode: ::std::os::raw::c_int, @@ -26735,1928 +27080,2013 @@ extern "C" { extern "C" { pub fn GetIndexAmRoutineByAmId(amoid: Oid, noerror: bool) -> *mut IndexAmRoutine; } +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct GinStatsData { + pub nPendingPages: BlockNumber, + pub nTotalPages: BlockNumber, + pub nEntryPages: BlockNumber, + pub nDataPages: BlockNumber, + pub nEntries: int64, + pub ginVersion: int32, +} +pub type GinTernaryValue = ::std::os::raw::c_char; #[pg_guard] extern "C" { - pub fn relation_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; + pub static mut GinFuzzySearchLimit: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn try_relation_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; + pub static mut gin_pending_list_limit: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn relation_openrv(relation: *const RangeVar, lockmode: LOCKMODE) -> Relation; + pub fn ginGetStats(index: Relation, stats: *mut GinStatsData); } #[pg_guard] extern "C" { - pub fn relation_openrv_extended( - relation: *const RangeVar, - lockmode: LOCKMODE, - missing_ok: bool, - ) -> Relation; + pub fn ginUpdateStats(index: Relation, stats: *const GinStatsData, is_build: bool); } #[pg_guard] extern "C" { - pub fn relation_close(relation: Relation, lockmode: LOCKMODE); + pub fn XLogBeginInsert(); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct TableScanDescData { - pub rs_rd: Relation, - pub rs_snapshot: *mut SnapshotData, - pub rs_nkeys: ::std::os::raw::c_int, - pub rs_key: *mut ScanKeyData, - pub rs_flags: uint32, - pub rs_parallel: *mut ParallelTableScanDescData, +#[pg_guard] +extern "C" { + pub fn XLogSetRecordFlags(flags: uint8); } -impl Default for TableScanDescData { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn XLogInsert(rmid: RmgrId, info: uint8) -> XLogRecPtr; } -pub type TableScanDesc = *mut TableScanDescData; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct ParallelTableScanDescData { - pub phs_relid: Oid, - pub phs_syncscan: bool, - pub phs_snapshot_any: bool, - pub phs_snapshot_off: Size, +#[pg_guard] +extern "C" { + pub fn XLogEnsureRecordSpace(nbuffers: ::std::os::raw::c_int, ndatas: ::std::os::raw::c_int); } -pub type ParallelTableScanDesc = *mut ParallelTableScanDescData; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct ParallelBlockTableScanDescData { - pub base: ParallelTableScanDescData, - pub phs_nblocks: BlockNumber, - pub phs_mutex: slock_t, - pub phs_startblock: BlockNumber, - pub phs_nallocated: pg_atomic_uint64, +#[pg_guard] +extern "C" { + pub fn XLogRegisterData(data: *mut ::std::os::raw::c_char, len: ::std::os::raw::c_int); } -pub type ParallelBlockTableScanDesc = *mut ParallelBlockTableScanDescData; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct IndexFetchTableData { - pub rel: Relation, +#[pg_guard] +extern "C" { + pub fn XLogRegisterBuffer(block_id: uint8, buffer: Buffer, flags: uint8); } -impl Default for IndexFetchTableData { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn XLogRegisterBlock( + block_id: uint8, + rnode: *mut RelFileNode, + forknum: ForkNumber, + blknum: BlockNumber, + page: *mut ::std::os::raw::c_char, + flags: uint8, + ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct IndexScanDescData { - pub heapRelation: Relation, - pub indexRelation: Relation, - pub xs_snapshot: *mut SnapshotData, - pub numberOfKeys: ::std::os::raw::c_int, - pub numberOfOrderBys: ::std::os::raw::c_int, - pub keyData: *mut ScanKeyData, - pub orderByData: *mut ScanKeyData, - pub xs_want_itup: bool, - pub xs_temp_snap: bool, - pub kill_prior_tuple: bool, - pub ignore_killed_tuples: bool, - pub xactStartedInRecovery: bool, - pub opaque: *mut ::std::os::raw::c_void, - pub xs_itup: IndexTuple, - pub xs_itupdesc: *mut TupleDescData, - pub xs_hitup: HeapTuple, - pub xs_hitupdesc: *mut TupleDescData, - pub xs_heaptid: ItemPointerData, - pub xs_heap_continue: bool, - pub xs_heapfetch: *mut IndexFetchTableData, - pub xs_recheck: bool, - pub xs_orderbyvals: *mut Datum, - pub xs_orderbynulls: *mut bool, - pub xs_recheckorderby: bool, - pub parallel_scan: *mut ParallelIndexScanDescData, +#[pg_guard] +extern "C" { + pub fn XLogRegisterBufData( + block_id: uint8, + data: *mut ::std::os::raw::c_char, + len: ::std::os::raw::c_int, + ); } -impl Default for IndexScanDescData { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn XLogResetInsertion(); } -#[repr(C)] -#[derive(Debug, Default)] -pub struct ParallelIndexScanDescData { - pub ps_relid: Oid, - pub ps_indexid: Oid, - pub ps_offset: Size, - pub ps_snapshot_data: __IncompleteArrayField<::std::os::raw::c_char>, +#[pg_guard] +extern "C" { + pub fn XLogCheckBufferNeedsBackup(buffer: Buffer) -> bool; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SysScanDescData { - pub heap_rel: Relation, - pub irel: Relation, - pub scan: *mut TableScanDescData, - pub iscan: *mut IndexScanDescData, - pub snapshot: *mut SnapshotData, - pub slot: *mut TupleTableSlot, +#[pg_guard] +extern "C" { + pub fn log_newpage( + rnode: *mut RelFileNode, + forkNum: ForkNumber, + blk: BlockNumber, + page: *mut ::std::os::raw::c_char, + page_std: bool, + ) -> XLogRecPtr; } -impl Default for SysScanDescData { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn log_newpage_buffer(buffer: Buffer, page_std: bool) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn table_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; + pub fn log_newpage_range( + rel: Relation, + forkNum: ForkNumber, + startblk: BlockNumber, + endblk: BlockNumber, + page_std: bool, + ); } #[pg_guard] extern "C" { - pub fn table_openrv(relation: *const RangeVar, lockmode: LOCKMODE) -> Relation; + pub fn XLogSaveBufferForHint(buffer: Buffer, buffer_std: bool) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn table_openrv_extended( - relation: *const RangeVar, - lockmode: LOCKMODE, - missing_ok: bool, - ) -> Relation; + pub fn InitXLogInsert(); } #[pg_guard] extern "C" { - pub fn table_close(relation: Relation, lockmode: LOCKMODE); + pub static mut sync_method: ::std::os::raw::c_int; } -pub type EOM_get_flat_size_method = - ::std::option::Option Size>; -pub type EOM_flatten_into_method = ::std::option::Option< - unsafe extern "C" fn( - eohptr: *mut ExpandedObjectHeader, - result: *mut ::std::os::raw::c_void, - allocated_size: Size, - ), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct ExpandedObjectMethods { - pub get_flat_size: EOM_get_flat_size_method, - pub flatten_into: EOM_flatten_into_method, +#[pg_guard] +extern "C" { + pub static mut ThisTimeLineID: TimeLineID; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ExpandedObjectHeader { - pub vl_len_: int32, - pub eoh_methods: *const ExpandedObjectMethods, - pub eoh_context: MemoryContext, - pub eoh_rw_ptr: [::std::os::raw::c_char; 10usize], - pub eoh_ro_ptr: [::std::os::raw::c_char; 10usize], +#[pg_guard] +extern "C" { + pub static mut InRecovery: bool; } -impl Default for ExpandedObjectHeader { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +pub const HotStandbyState_STANDBY_DISABLED: HotStandbyState = 0; +pub const HotStandbyState_STANDBY_INITIALIZED: HotStandbyState = 1; +pub const HotStandbyState_STANDBY_SNAPSHOT_PENDING: HotStandbyState = 2; +pub const HotStandbyState_STANDBY_SNAPSHOT_READY: HotStandbyState = 3; +pub type HotStandbyState = ::std::os::raw::c_uint; +#[pg_guard] +extern "C" { + pub static mut standbyState: HotStandbyState; } +pub const RecoveryTargetType_RECOVERY_TARGET_UNSET: RecoveryTargetType = 0; +pub const RecoveryTargetType_RECOVERY_TARGET_XID: RecoveryTargetType = 1; +pub const RecoveryTargetType_RECOVERY_TARGET_TIME: RecoveryTargetType = 2; +pub const RecoveryTargetType_RECOVERY_TARGET_NAME: RecoveryTargetType = 3; +pub const RecoveryTargetType_RECOVERY_TARGET_LSN: RecoveryTargetType = 4; +pub const RecoveryTargetType_RECOVERY_TARGET_IMMEDIATE: RecoveryTargetType = 5; +pub type RecoveryTargetType = ::std::os::raw::c_uint; +pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_CONTROLFILE: + RecoveryTargetTimeLineGoal = 0; +pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_LATEST: RecoveryTargetTimeLineGoal = + 1; +pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_NUMERIC: RecoveryTargetTimeLineGoal = + 2; +pub type RecoveryTargetTimeLineGoal = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn DatumGetEOHP(d: Datum) -> *mut ExpandedObjectHeader; + pub static mut ProcLastRecPtr: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn EOH_init_header( - eohptr: *mut ExpandedObjectHeader, - methods: *const ExpandedObjectMethods, - obj_context: MemoryContext, - ); + pub static mut XactLastRecEnd: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn EOH_get_flat_size(eohptr: *mut ExpandedObjectHeader) -> Size; + pub static mut XactLastCommitEnd: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn EOH_flatten_into( - eohptr: *mut ExpandedObjectHeader, - result: *mut ::std::os::raw::c_void, - allocated_size: Size, - ); + pub static mut reachedConsistency: bool; } #[pg_guard] extern "C" { - pub fn MakeExpandedObjectReadOnlyInternal(d: Datum) -> Datum; + pub static mut wal_segment_size: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn TransferExpandedObject(d: Datum, new_parent: MemoryContext) -> Datum; + pub static mut min_wal_size_mb: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn DeleteExpandedObject(d: Datum); + pub static mut max_wal_size_mb: ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct ArrayType { - pub vl_len_: int32, - pub ndim: ::std::os::raw::c_int, - pub dataoffset: int32, - pub elemtype: Oid, +#[pg_guard] +extern "C" { + pub static mut wal_keep_segments: ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ExpandedArrayHeader { - pub hdr: ExpandedObjectHeader, - pub ea_magic: ::std::os::raw::c_int, - pub ndims: ::std::os::raw::c_int, - pub dims: *mut ::std::os::raw::c_int, - pub lbound: *mut ::std::os::raw::c_int, - pub element_type: Oid, - pub typlen: int16, - pub typbyval: bool, - pub typalign: ::std::os::raw::c_char, - pub dvalues: *mut Datum, - pub dnulls: *mut bool, - pub dvalueslen: ::std::os::raw::c_int, - pub nelems: ::std::os::raw::c_int, - pub flat_size: Size, - pub fvalue: *mut ArrayType, - pub fstartptr: *mut ::std::os::raw::c_char, - pub fendptr: *mut ::std::os::raw::c_char, -} -impl Default for ExpandedArrayHeader { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union AnyArrayType { - pub flt: ArrayType, - pub xpn: ExpandedArrayHeader, - _bindgen_union_align: [u64; 17usize], -} -impl Default for AnyArrayType { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayBuildState { - pub mcontext: MemoryContext, - pub dvalues: *mut Datum, - pub dnulls: *mut bool, - pub alen: ::std::os::raw::c_int, - pub nelems: ::std::os::raw::c_int, - pub element_type: Oid, - pub typlen: int16, - pub typbyval: bool, - pub typalign: ::std::os::raw::c_char, - pub private_cxt: bool, -} -impl Default for ArrayBuildState { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayBuildStateArr { - pub mcontext: MemoryContext, - pub data: *mut ::std::os::raw::c_char, - pub nullbitmap: *mut bits8, - pub abytes: ::std::os::raw::c_int, - pub nbytes: ::std::os::raw::c_int, - pub aitems: ::std::os::raw::c_int, - pub nitems: ::std::os::raw::c_int, - pub ndims: ::std::os::raw::c_int, - pub dims: [::std::os::raw::c_int; 6usize], - pub lbs: [::std::os::raw::c_int; 6usize], - pub array_type: Oid, - pub element_type: Oid, - pub private_cxt: bool, -} -impl Default for ArrayBuildStateArr { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayBuildStateAny { - pub scalarstate: *mut ArrayBuildState, - pub arraystate: *mut ArrayBuildStateArr, -} -impl Default for ArrayBuildStateAny { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayMetaState { - pub element_type: Oid, - pub typlen: int16, - pub typbyval: bool, - pub typalign: ::std::os::raw::c_char, - pub typdelim: ::std::os::raw::c_char, - pub typioparam: Oid, - pub typiofunc: Oid, - pub proc_: FmgrInfo, -} -impl Default for ArrayMetaState { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayMapState { - pub inp_extra: ArrayMetaState, - pub ret_extra: ArrayMetaState, -} -impl Default for ArrayMapState { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayIteratorData { - _unused: [u8; 0], +#[pg_guard] +extern "C" { + pub static mut XLOGbuffers: ::std::os::raw::c_int; } -pub type ArrayIterator = *mut ArrayIteratorData; #[pg_guard] extern "C" { - pub static mut Array_nulls: bool; + pub static mut XLogArchiveTimeout: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn CopyArrayEls( - array: *mut ArrayType, - values: *mut Datum, - nulls: *mut bool, - nitems: ::std::os::raw::c_int, - typlen: ::std::os::raw::c_int, - typbyval: bool, - typalign: ::std::os::raw::c_char, - freedata: bool, - ); + pub static mut wal_retrieve_retry_interval: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn array_get_element( - arraydatum: Datum, - nSubscripts: ::std::os::raw::c_int, - indx: *mut ::std::os::raw::c_int, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - isNull: *mut bool, - ) -> Datum; + pub static mut XLogArchiveCommand: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn array_set_element( - arraydatum: Datum, - nSubscripts: ::std::os::raw::c_int, - indx: *mut ::std::os::raw::c_int, - dataValue: Datum, - isNull: bool, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> Datum; + pub static mut EnableHotStandby: bool; } #[pg_guard] extern "C" { - pub fn array_get_slice( - arraydatum: Datum, - nSubscripts: ::std::os::raw::c_int, - upperIndx: *mut ::std::os::raw::c_int, - lowerIndx: *mut ::std::os::raw::c_int, - upperProvided: *mut bool, - lowerProvided: *mut bool, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> Datum; + pub static mut fullPageWrites: bool; } #[pg_guard] extern "C" { - pub fn array_set_slice( - arraydatum: Datum, - nSubscripts: ::std::os::raw::c_int, - upperIndx: *mut ::std::os::raw::c_int, - lowerIndx: *mut ::std::os::raw::c_int, - upperProvided: *mut bool, - lowerProvided: *mut bool, - srcArrayDatum: Datum, - isNull: bool, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> Datum; + pub static mut wal_log_hints: bool; } #[pg_guard] extern "C" { - pub fn array_ref( - array: *mut ArrayType, - nSubscripts: ::std::os::raw::c_int, - indx: *mut ::std::os::raw::c_int, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - isNull: *mut bool, - ) -> Datum; + pub static mut wal_compression: bool; } #[pg_guard] extern "C" { - pub fn array_set( - array: *mut ArrayType, - nSubscripts: ::std::os::raw::c_int, - indx: *mut ::std::os::raw::c_int, - dataValue: Datum, - isNull: bool, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> *mut ArrayType; + pub static mut wal_init_zero: bool; } #[pg_guard] extern "C" { - pub fn array_map( - arrayd: Datum, - exprstate: *mut ExprState, - econtext: *mut ExprContext, - retType: Oid, - amstate: *mut ArrayMapState, - ) -> Datum; + pub static mut wal_recycle: bool; } #[pg_guard] extern "C" { - pub fn array_bitmap_copy( - destbitmap: *mut bits8, - destoffset: ::std::os::raw::c_int, - srcbitmap: *const bits8, - srcoffset: ::std::os::raw::c_int, - nitems: ::std::os::raw::c_int, - ); + pub static mut wal_consistency_checking: *mut bool; } #[pg_guard] extern "C" { - pub fn construct_array( - elems: *mut Datum, - nelems: ::std::os::raw::c_int, - elmtype: Oid, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> *mut ArrayType; + pub static mut wal_consistency_checking_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn construct_md_array( - elems: *mut Datum, - nulls: *mut bool, - ndims: ::std::os::raw::c_int, - dims: *mut ::std::os::raw::c_int, - lbs: *mut ::std::os::raw::c_int, - elmtype: Oid, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> *mut ArrayType; + pub static mut log_checkpoints: bool; } #[pg_guard] extern "C" { - pub fn construct_empty_array(elmtype: Oid) -> *mut ArrayType; + pub static mut recoveryRestoreCommand: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn construct_empty_expanded_array( - element_type: Oid, - parentcontext: MemoryContext, - metacache: *mut ArrayMetaState, - ) -> *mut ExpandedArrayHeader; + pub static mut recoveryEndCommand: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn deconstruct_array( - array: *mut ArrayType, - elmtype: Oid, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - elemsp: *mut *mut Datum, - nullsp: *mut *mut bool, - nelemsp: *mut ::std::os::raw::c_int, - ); + pub static mut archiveCleanupCommand: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn array_contains_nulls(array: *mut ArrayType) -> bool; + pub static mut recoveryTargetInclusive: bool; } #[pg_guard] extern "C" { - pub fn initArrayResult( - element_type: Oid, - rcontext: MemoryContext, - subcontext: bool, - ) -> *mut ArrayBuildState; + pub static mut recoveryTargetAction: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn accumArrayResult( - astate: *mut ArrayBuildState, - dvalue: Datum, - disnull: bool, - element_type: Oid, - rcontext: MemoryContext, - ) -> *mut ArrayBuildState; + pub static mut recovery_min_apply_delay: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn makeArrayResult(astate: *mut ArrayBuildState, rcontext: MemoryContext) -> Datum; + pub static mut PrimaryConnInfo: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn makeMdArrayResult( - astate: *mut ArrayBuildState, - ndims: ::std::os::raw::c_int, - dims: *mut ::std::os::raw::c_int, - lbs: *mut ::std::os::raw::c_int, - rcontext: MemoryContext, - release: bool, - ) -> Datum; + pub static mut PrimarySlotName: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn initArrayResultArr( - array_type: Oid, - element_type: Oid, - rcontext: MemoryContext, - subcontext: bool, - ) -> *mut ArrayBuildStateArr; + pub static mut recoveryTargetXid: TransactionId; } #[pg_guard] extern "C" { - pub fn accumArrayResultArr( - astate: *mut ArrayBuildStateArr, - dvalue: Datum, - disnull: bool, - array_type: Oid, - rcontext: MemoryContext, - ) -> *mut ArrayBuildStateArr; + pub static mut recovery_target_time_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn makeArrayResultArr( - astate: *mut ArrayBuildStateArr, - rcontext: MemoryContext, - release: bool, - ) -> Datum; + pub static mut recoveryTargetName: *const ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn initArrayResultAny( - input_type: Oid, - rcontext: MemoryContext, - subcontext: bool, - ) -> *mut ArrayBuildStateAny; + pub static mut recoveryTargetLSN: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn accumArrayResultAny( - astate: *mut ArrayBuildStateAny, - dvalue: Datum, - disnull: bool, - input_type: Oid, - rcontext: MemoryContext, - ) -> *mut ArrayBuildStateAny; + pub static mut recoveryTarget: RecoveryTargetType; } #[pg_guard] extern "C" { - pub fn makeArrayResultAny( - astate: *mut ArrayBuildStateAny, - rcontext: MemoryContext, - release: bool, - ) -> Datum; + pub static mut PromoteTriggerFile: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn array_create_iterator( - arr: *mut ArrayType, - slice_ndim: ::std::os::raw::c_int, - mstate: *mut ArrayMetaState, - ) -> ArrayIterator; + pub static mut recoveryTargetTimeLineGoal: RecoveryTargetTimeLineGoal; } #[pg_guard] extern "C" { - pub fn array_iterate(iterator: ArrayIterator, value: *mut Datum, isnull: *mut bool) -> bool; + pub static mut recoveryTargetTLIRequested: TimeLineID; } #[pg_guard] extern "C" { - pub fn array_free_iterator(iterator: ArrayIterator); + pub static mut recoveryTargetTLI: TimeLineID; } #[pg_guard] extern "C" { - pub fn ArrayGetOffset( - n: ::std::os::raw::c_int, - dim: *const ::std::os::raw::c_int, - lb: *const ::std::os::raw::c_int, - indx: *const ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub static mut CheckPointSegments: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn ArrayGetOffset0( - n: ::std::os::raw::c_int, - tup: *const ::std::os::raw::c_int, - scale: *const ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub static mut StandbyModeRequested: bool; } #[pg_guard] extern "C" { - pub fn ArrayGetNItems( - ndim: ::std::os::raw::c_int, - dims: *const ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub static mut StandbyMode: bool; } +pub const ArchiveMode_ARCHIVE_MODE_OFF: ArchiveMode = 0; +pub const ArchiveMode_ARCHIVE_MODE_ON: ArchiveMode = 1; +pub const ArchiveMode_ARCHIVE_MODE_ALWAYS: ArchiveMode = 2; +pub type ArchiveMode = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn mda_get_range( - n: ::std::os::raw::c_int, - span: *mut ::std::os::raw::c_int, - st: *const ::std::os::raw::c_int, - endp: *const ::std::os::raw::c_int, - ); + pub static mut XLogArchiveMode: ::std::os::raw::c_int; } +pub const WalLevel_WAL_LEVEL_MINIMAL: WalLevel = 0; +pub const WalLevel_WAL_LEVEL_REPLICA: WalLevel = 1; +pub const WalLevel_WAL_LEVEL_LOGICAL: WalLevel = 2; +pub type WalLevel = ::std::os::raw::c_uint; +pub const RecoveryState_RECOVERY_STATE_CRASH: RecoveryState = 0; +pub const RecoveryState_RECOVERY_STATE_ARCHIVE: RecoveryState = 1; +pub const RecoveryState_RECOVERY_STATE_DONE: RecoveryState = 2; +pub type RecoveryState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn mda_get_prod( - n: ::std::os::raw::c_int, - range: *const ::std::os::raw::c_int, - prod: *mut ::std::os::raw::c_int, - ); + pub static mut wal_level: ::std::os::raw::c_int; +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct CheckpointStatsData { + pub ckpt_start_t: TimestampTz, + pub ckpt_write_t: TimestampTz, + pub ckpt_sync_t: TimestampTz, + pub ckpt_sync_end_t: TimestampTz, + pub ckpt_end_t: TimestampTz, + pub ckpt_bufs_written: ::std::os::raw::c_int, + pub ckpt_segs_added: ::std::os::raw::c_int, + pub ckpt_segs_removed: ::std::os::raw::c_int, + pub ckpt_segs_recycled: ::std::os::raw::c_int, + pub ckpt_sync_rels: ::std::os::raw::c_int, + pub ckpt_longest_sync: uint64, + pub ckpt_agg_sync_time: uint64, } #[pg_guard] extern "C" { - pub fn mda_get_offset_values( - n: ::std::os::raw::c_int, - dist: *mut ::std::os::raw::c_int, - prod: *const ::std::os::raw::c_int, - span: *const ::std::os::raw::c_int, - ); + pub static mut CheckpointStats: CheckpointStatsData; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct XLogRecData { + _unused: [u8; 0], } #[pg_guard] extern "C" { - pub fn mda_next_tuple( - n: ::std::os::raw::c_int, - curr: *mut ::std::os::raw::c_int, - span: *const ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub fn XLogInsertRecord( + rdata: *mut XLogRecData, + fpw_lsn: XLogRecPtr, + flags: uint8, + ) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn ArrayGetIntegerTypmods(arr: *mut ArrayType, n: *mut ::std::os::raw::c_int) - -> *mut int32; + pub fn XLogFlush(RecPtr: XLogRecPtr); } #[pg_guard] extern "C" { - pub fn expand_array( - arraydatum: Datum, - parentcontext: MemoryContext, - metacache: *mut ArrayMetaState, - ) -> Datum; + pub fn XLogBackgroundFlush() -> bool; } #[pg_guard] extern "C" { - pub fn DatumGetExpandedArray(d: Datum) -> *mut ExpandedArrayHeader; + pub fn XLogNeedsFlush(RecPtr: XLogRecPtr) -> bool; } #[pg_guard] extern "C" { - pub fn DatumGetExpandedArrayX( - d: Datum, - metacache: *mut ArrayMetaState, - ) -> *mut ExpandedArrayHeader; + pub fn XLogFileInit( + segno: XLogSegNo, + use_existent: *mut bool, + use_lock: bool, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn DatumGetAnyArrayP(d: Datum) -> *mut AnyArrayType; + pub fn XLogFileOpen(segno: XLogSegNo) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn deconstruct_expanded_array(eah: *mut ExpandedArrayHeader); -} -pub const GucContext_PGC_INTERNAL: GucContext = 0; -pub const GucContext_PGC_POSTMASTER: GucContext = 1; -pub const GucContext_PGC_SIGHUP: GucContext = 2; -pub const GucContext_PGC_SU_BACKEND: GucContext = 3; -pub const GucContext_PGC_BACKEND: GucContext = 4; -pub const GucContext_PGC_SUSET: GucContext = 5; -pub const GucContext_PGC_USERSET: GucContext = 6; -pub type GucContext = ::std::os::raw::c_uint; -pub const GucSource_PGC_S_DEFAULT: GucSource = 0; -pub const GucSource_PGC_S_DYNAMIC_DEFAULT: GucSource = 1; -pub const GucSource_PGC_S_ENV_VAR: GucSource = 2; -pub const GucSource_PGC_S_FILE: GucSource = 3; -pub const GucSource_PGC_S_ARGV: GucSource = 4; -pub const GucSource_PGC_S_GLOBAL: GucSource = 5; -pub const GucSource_PGC_S_DATABASE: GucSource = 6; -pub const GucSource_PGC_S_USER: GucSource = 7; -pub const GucSource_PGC_S_DATABASE_USER: GucSource = 8; -pub const GucSource_PGC_S_CLIENT: GucSource = 9; -pub const GucSource_PGC_S_OVERRIDE: GucSource = 10; -pub const GucSource_PGC_S_INTERACTIVE: GucSource = 11; -pub const GucSource_PGC_S_TEST: GucSource = 12; -pub const GucSource_PGC_S_SESSION: GucSource = 13; -pub type GucSource = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ConfigVariable { - pub name: *mut ::std::os::raw::c_char, - pub value: *mut ::std::os::raw::c_char, - pub errmsg: *mut ::std::os::raw::c_char, - pub filename: *mut ::std::os::raw::c_char, - pub sourceline: ::std::os::raw::c_int, - pub ignore: bool, - pub applied: bool, - pub next: *mut ConfigVariable, + pub fn CheckXLogRemoved(segno: XLogSegNo, tli: TimeLineID); } -impl Default for ConfigVariable { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn XLogGetLastRemovedSegno() -> XLogSegNo; } #[pg_guard] extern "C" { - pub fn ParseConfigFile( - config_file: *const ::std::os::raw::c_char, - strict: bool, - calling_file: *const ::std::os::raw::c_char, - calling_lineno: ::std::os::raw::c_int, - depth: ::std::os::raw::c_int, - elevel: ::std::os::raw::c_int, - head_p: *mut *mut ConfigVariable, - tail_p: *mut *mut ConfigVariable, - ) -> bool; + pub fn XLogSetAsyncXactLSN(record: XLogRecPtr); } #[pg_guard] extern "C" { - pub fn ParseConfigFp( - fp: *mut FILE, - config_file: *const ::std::os::raw::c_char, - depth: ::std::os::raw::c_int, - elevel: ::std::os::raw::c_int, - head_p: *mut *mut ConfigVariable, - tail_p: *mut *mut ConfigVariable, - ) -> bool; + pub fn XLogSetReplicationSlotMinimumLSN(lsn: XLogRecPtr); } #[pg_guard] extern "C" { - pub fn ParseConfigDirectory( - includedir: *const ::std::os::raw::c_char, - calling_file: *const ::std::os::raw::c_char, - calling_lineno: ::std::os::raw::c_int, - depth: ::std::os::raw::c_int, - elevel: ::std::os::raw::c_int, - head_p: *mut *mut ConfigVariable, - tail_p: *mut *mut ConfigVariable, - ) -> bool; + pub fn xlog_redo(record: *mut XLogReaderState); } #[pg_guard] extern "C" { - pub fn FreeConfigVariables(list: *mut ConfigVariable); + pub fn xlog_desc(buf: StringInfo, record: *mut XLogReaderState); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct config_enum_entry { - pub name: *const ::std::os::raw::c_char, - pub val: ::std::os::raw::c_int, - pub hidden: bool, -} -impl Default for config_enum_entry { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type GucBoolCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut bool, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucIntCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut ::std::os::raw::c_int, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucRealCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut f64, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucStringCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut *mut ::std::os::raw::c_char, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucEnumCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut ::std::os::raw::c_int, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucBoolAssignHook = - ::std::option::Option; -pub type GucIntAssignHook = ::std::option::Option< - unsafe extern "C" fn(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void), ->; -pub type GucRealAssignHook = - ::std::option::Option; -pub type GucStringAssignHook = ::std::option::Option< - unsafe extern "C" fn(newval: *const ::std::os::raw::c_char, extra: *mut ::std::os::raw::c_void), ->; -pub type GucEnumAssignHook = ::std::option::Option< - unsafe extern "C" fn(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void), ->; -pub type GucShowHook = - ::std::option::Option *const ::std::os::raw::c_char>; -pub const GucAction_GUC_ACTION_SET: GucAction = 0; -pub const GucAction_GUC_ACTION_LOCAL: GucAction = 1; -pub const GucAction_GUC_ACTION_SAVE: GucAction = 2; -pub type GucAction = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut log_duration: bool; + pub fn xlog_identify(info: uint8) -> *const ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut Debug_print_plan: bool; + pub fn issue_xlog_fsync(fd: ::std::os::raw::c_int, segno: XLogSegNo); } #[pg_guard] extern "C" { - pub static mut Debug_print_parse: bool; + pub fn RecoveryInProgress() -> bool; } #[pg_guard] extern "C" { - pub static mut Debug_print_rewritten: bool; + pub fn GetRecoveryState() -> RecoveryState; } #[pg_guard] extern "C" { - pub static mut Debug_pretty_print: bool; + pub fn HotStandbyActive() -> bool; } #[pg_guard] extern "C" { - pub static mut log_parser_stats: bool; + pub fn HotStandbyActiveInReplay() -> bool; } #[pg_guard] extern "C" { - pub static mut log_planner_stats: bool; + pub fn XLogInsertAllowed() -> bool; } #[pg_guard] extern "C" { - pub static mut log_executor_stats: bool; + pub fn GetXLogReceiptTime(rtime: *mut TimestampTz, fromStream: *mut bool); } #[pg_guard] extern "C" { - pub static mut log_statement_stats: bool; + pub fn GetXLogReplayRecPtr(replayTLI: *mut TimeLineID) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut log_btree_build_stats: bool; + pub fn GetXLogInsertRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut check_function_bodies: bool; + pub fn GetXLogWriteRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut session_auth_is_superuser: bool; + pub fn RecoveryIsPaused() -> bool; } #[pg_guard] extern "C" { - pub static mut log_min_error_statement: ::std::os::raw::c_int; + pub fn SetRecoveryPause(recoveryPause: bool); } #[pg_guard] extern "C" { - pub static mut log_min_messages: ::std::os::raw::c_int; + pub fn GetLatestXTime() -> TimestampTz; } #[pg_guard] extern "C" { - pub static mut client_min_messages: ::std::os::raw::c_int; + pub fn GetCurrentChunkReplayStartTime() -> TimestampTz; } #[pg_guard] extern "C" { - pub static mut log_min_duration_statement: ::std::os::raw::c_int; + pub fn XLogFileNameP(tli: TimeLineID, segno: XLogSegNo) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut log_temp_files: ::std::os::raw::c_int; + pub fn UpdateControlFile(); } #[pg_guard] extern "C" { - pub static mut log_xact_sample_rate: f64; + pub fn GetSystemIdentifier() -> uint64; } #[pg_guard] extern "C" { - pub static mut temp_file_limit: ::std::os::raw::c_int; + pub fn GetMockAuthenticationNonce() -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut num_temp_buffers: ::std::os::raw::c_int; + pub fn DataChecksumsEnabled() -> bool; } #[pg_guard] extern "C" { - pub static mut cluster_name: *mut ::std::os::raw::c_char; + pub fn GetFakeLSNForUnloggedRel() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut ConfigFileName: *mut ::std::os::raw::c_char; + pub fn XLOGShmemSize() -> Size; } #[pg_guard] extern "C" { - pub static mut HbaFileName: *mut ::std::os::raw::c_char; + pub fn XLOGShmemInit(); } #[pg_guard] extern "C" { - pub static mut IdentFileName: *mut ::std::os::raw::c_char; + pub fn BootStrapXLOG(); } #[pg_guard] extern "C" { - pub static mut external_pid_file: *mut ::std::os::raw::c_char; + pub fn LocalProcessControlFile(reset: bool); } #[pg_guard] extern "C" { - pub static mut application_name: *mut ::std::os::raw::c_char; + pub fn StartupXLOG(); } #[pg_guard] extern "C" { - pub static mut tcp_keepalives_idle: ::std::os::raw::c_int; + pub fn ShutdownXLOG(code: ::std::os::raw::c_int, arg: Datum); } #[pg_guard] extern "C" { - pub static mut tcp_keepalives_interval: ::std::os::raw::c_int; + pub fn InitXLOGAccess(); } #[pg_guard] extern "C" { - pub static mut tcp_keepalives_count: ::std::os::raw::c_int; + pub fn CreateCheckPoint(flags: ::std::os::raw::c_int); } #[pg_guard] extern "C" { - pub static mut tcp_user_timeout: ::std::os::raw::c_int; + pub fn CreateRestartPoint(flags: ::std::os::raw::c_int) -> bool; } #[pg_guard] extern "C" { - pub static mut trace_sort: bool; + pub fn XLogPutNextOid(nextOid: Oid); } #[pg_guard] extern "C" { - pub fn SetConfigOption( - name: *const ::std::os::raw::c_char, - value: *const ::std::os::raw::c_char, - context: GucContext, - source: GucSource, - ); + pub fn XLogRestorePoint(rpName: *const ::std::os::raw::c_char) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn DefineCustomBoolVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut bool, - bootValue: bool, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucBoolCheckHook, - assign_hook: GucBoolAssignHook, - show_hook: GucShowHook, - ); + pub fn UpdateFullPageWrites(); } #[pg_guard] extern "C" { - pub fn DefineCustomIntVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut ::std::os::raw::c_int, - bootValue: ::std::os::raw::c_int, - minValue: ::std::os::raw::c_int, - maxValue: ::std::os::raw::c_int, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucIntCheckHook, - assign_hook: GucIntAssignHook, - show_hook: GucShowHook, - ); + pub fn GetFullPageWriteInfo(RedoRecPtr_p: *mut XLogRecPtr, doPageWrites_p: *mut bool); } #[pg_guard] extern "C" { - pub fn DefineCustomRealVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut f64, - bootValue: f64, - minValue: f64, - maxValue: f64, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucRealCheckHook, - assign_hook: GucRealAssignHook, - show_hook: GucShowHook, - ); + pub fn GetRedoRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn DefineCustomStringVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut *mut ::std::os::raw::c_char, - bootValue: *const ::std::os::raw::c_char, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucStringCheckHook, - assign_hook: GucStringAssignHook, - show_hook: GucShowHook, - ); + pub fn GetInsertRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn DefineCustomEnumVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut ::std::os::raw::c_int, - bootValue: ::std::os::raw::c_int, - options: *const config_enum_entry, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucEnumCheckHook, - assign_hook: GucEnumAssignHook, - show_hook: GucShowHook, - ); + pub fn GetFlushRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn EmitWarningsOnPlaceholders(className: *const ::std::os::raw::c_char); + pub fn GetLastImportantRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn GetConfigOption( - name: *const ::std::os::raw::c_char, - missing_ok: bool, - restrict_privileged: bool, - ) -> *const ::std::os::raw::c_char; + pub fn RemovePromoteSignalFiles(); } #[pg_guard] extern "C" { - pub fn GetConfigOptionResetString( - name: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char; + pub fn CheckPromoteSignal() -> bool; } #[pg_guard] extern "C" { - pub fn GetConfigOptionFlags( - name: *const ::std::os::raw::c_char, - missing_ok: bool, - ) -> ::std::os::raw::c_int; + pub fn WakeupRecovery(); } #[pg_guard] extern "C" { - pub fn ProcessConfigFile(context: GucContext); + pub fn SetWalWriterSleeping(sleeping: bool); } #[pg_guard] extern "C" { - pub fn InitializeGUCOptions(); + pub fn XLogRequestWalReceiverReply(); } #[pg_guard] extern "C" { - pub fn SelectConfigFiles( - userDoption: *const ::std::os::raw::c_char, - progname: *const ::std::os::raw::c_char, - ) -> bool; + pub fn assign_max_wal_size(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void); } #[pg_guard] extern "C" { - pub fn ResetAllOptions(); + pub fn assign_checkpoint_completion_target(newval: f64, extra: *mut ::std::os::raw::c_void); } +pub const SessionBackupState_SESSION_BACKUP_NONE: SessionBackupState = 0; +pub const SessionBackupState_SESSION_BACKUP_EXCLUSIVE: SessionBackupState = 1; +pub const SessionBackupState_SESSION_BACKUP_NON_EXCLUSIVE: SessionBackupState = 2; +pub type SessionBackupState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn AtStart_GUC(); + pub fn do_pg_start_backup( + backupidstr: *const ::std::os::raw::c_char, + fast: bool, + starttli_p: *mut TimeLineID, + labelfile: StringInfo, + tablespaces: *mut *mut List, + tblspcmapfile: StringInfo, + infotbssize: bool, + needtblspcmapfile: bool, + ) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn NewGUCNestLevel() -> ::std::os::raw::c_int; + pub fn do_pg_stop_backup( + labelfile: *mut ::std::os::raw::c_char, + waitforarchive: bool, + stoptli_p: *mut TimeLineID, + ) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn AtEOXact_GUC(isCommit: bool, nestLevel: ::std::os::raw::c_int); + pub fn do_pg_abort_backup(code: ::std::os::raw::c_int, arg: Datum); } #[pg_guard] extern "C" { - pub fn BeginReportingGUCOptions(); + pub fn register_persistent_abort_backup_handler(); } #[pg_guard] extern "C" { - pub fn ParseLongOption( - string: *const ::std::os::raw::c_char, - name: *mut *mut ::std::os::raw::c_char, - value: *mut *mut ::std::os::raw::c_char, - ); + pub fn get_backup_status() -> SessionBackupState; } -#[pg_guard] -extern "C" { - pub fn parse_int( - value: *const ::std::os::raw::c_char, - result: *mut ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - hintmsg: *mut *const ::std::os::raw::c_char, - ) -> bool; +pub type GistNSN = XLogRecPtr; +pub type PageGistNSN = PageXLogRecPtr; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct GISTPageOpaqueData { + pub nsn: PageGistNSN, + pub rightlink: BlockNumber, + pub flags: uint16, + pub gist_page_id: uint16, +} +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, + pub spl_ldatum: Datum, + pub spl_ldatum_exists: bool, + pub spl_right: *mut OffsetNumber, + pub spl_nright: ::std::os::raw::c_int, + pub spl_rdatum: Datum, + pub spl_rdatum_exists: bool, +} +impl Default for GIST_SPLITVEC { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GISTENTRY { + pub key: Datum, + pub rel: Relation, + pub page: Page, + pub offset: OffsetNumber, + pub leafkey: bool, +} +impl Default for GISTENTRY { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct GISTDeletedPageContents { + pub deleteXid: FullTransactionId, +} +#[repr(C)] +#[derive(Debug)] +pub struct GistEntryVector { + pub n: int32, + pub vector: __IncompleteArrayField, +} +impl Default for GistEntryVector { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } #[pg_guard] extern "C" { - pub fn parse_real( - value: *const ::std::os::raw::c_char, - result: *mut f64, - flags: ::std::os::raw::c_int, - hintmsg: *mut *const ::std::os::raw::c_char, - ) -> bool; + pub fn relation_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn set_config_option( - name: *const ::std::os::raw::c_char, - value: *const ::std::os::raw::c_char, - context: GucContext, - source: GucSource, - action: GucAction, - changeVal: bool, - elevel: ::std::os::raw::c_int, - is_reload: bool, - ) -> ::std::os::raw::c_int; + pub fn try_relation_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn AlterSystemSetConfigFile(setstmt: *mut AlterSystemStmt); + pub fn relation_openrv(relation: *const RangeVar, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn GetConfigOptionByName( - name: *const ::std::os::raw::c_char, - varname: *mut *const ::std::os::raw::c_char, + pub fn relation_openrv_extended( + relation: *const RangeVar, + lockmode: LOCKMODE, missing_ok: bool, - ) -> *mut ::std::os::raw::c_char; + ) -> Relation; } #[pg_guard] extern "C" { - pub fn GetConfigOptionByNum( - varnum: ::std::os::raw::c_int, - values: *mut *const ::std::os::raw::c_char, - noshow: *mut bool, - ); + pub fn relation_close(relation: Relation, lockmode: LOCKMODE); } -#[pg_guard] -extern "C" { - pub fn GetNumConfigOptions() -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TableScanDescData { + pub rs_rd: Relation, + pub rs_snapshot: *mut SnapshotData, + pub rs_nkeys: ::std::os::raw::c_int, + pub rs_key: *mut ScanKeyData, + pub rs_flags: uint32, + pub rs_parallel: *mut ParallelTableScanDescData, +} +impl Default for TableScanDescData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub type TableScanDesc = *mut TableScanDescData; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct ParallelTableScanDescData { + pub phs_relid: Oid, + pub phs_syncscan: bool, + pub phs_snapshot_any: bool, + pub phs_snapshot_off: Size, +} +pub type ParallelTableScanDesc = *mut ParallelTableScanDescData; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct ParallelBlockTableScanDescData { + pub base: ParallelTableScanDescData, + pub phs_nblocks: BlockNumber, + pub phs_mutex: slock_t, + pub phs_startblock: BlockNumber, + pub phs_nallocated: pg_atomic_uint64, +} +pub type ParallelBlockTableScanDesc = *mut ParallelBlockTableScanDescData; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct IndexFetchTableData { + pub rel: Relation, +} +impl Default for IndexFetchTableData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct IndexScanDescData { + pub heapRelation: Relation, + pub indexRelation: Relation, + pub xs_snapshot: *mut SnapshotData, + pub numberOfKeys: ::std::os::raw::c_int, + pub numberOfOrderBys: ::std::os::raw::c_int, + pub keyData: *mut ScanKeyData, + pub orderByData: *mut ScanKeyData, + pub xs_want_itup: bool, + pub xs_temp_snap: bool, + pub kill_prior_tuple: bool, + pub ignore_killed_tuples: bool, + pub xactStartedInRecovery: bool, + pub opaque: *mut ::std::os::raw::c_void, + pub xs_itup: IndexTuple, + pub xs_itupdesc: *mut TupleDescData, + pub xs_hitup: HeapTuple, + pub xs_hitupdesc: *mut TupleDescData, + pub xs_heaptid: ItemPointerData, + pub xs_heap_continue: bool, + pub xs_heapfetch: *mut IndexFetchTableData, + pub xs_recheck: bool, + pub xs_orderbyvals: *mut Datum, + pub xs_orderbynulls: *mut bool, + pub xs_recheckorderby: bool, + pub parallel_scan: *mut ParallelIndexScanDescData, +} +impl Default for IndexScanDescData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct ParallelIndexScanDescData { + pub ps_relid: Oid, + pub ps_indexid: Oid, + pub ps_offset: Size, + pub ps_snapshot_data: __IncompleteArrayField<::std::os::raw::c_char>, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct SysScanDescData { + pub heap_rel: Relation, + pub irel: Relation, + pub scan: *mut TableScanDescData, + pub iscan: *mut IndexScanDescData, + pub snapshot: *mut SnapshotData, + pub slot: *mut TupleTableSlot, +} +impl Default for SysScanDescData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } #[pg_guard] extern "C" { - pub fn SetPGVariable(name: *const ::std::os::raw::c_char, args: *mut List, is_local: bool); + pub fn table_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn GetPGVariable(name: *const ::std::os::raw::c_char, dest: *mut DestReceiver); + pub fn table_openrv(relation: *const RangeVar, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn GetPGVariableResultDesc(name: *const ::std::os::raw::c_char) -> TupleDesc; + pub fn table_openrv_extended( + relation: *const RangeVar, + lockmode: LOCKMODE, + missing_ok: bool, + ) -> Relation; } #[pg_guard] extern "C" { - pub fn ExecSetVariableStmt(stmt: *mut VariableSetStmt, isTopLevel: bool); + pub fn table_close(relation: Relation, lockmode: LOCKMODE); +} +pub type EOM_get_flat_size_method = + ::std::option::Option Size>; +pub type EOM_flatten_into_method = ::std::option::Option< + unsafe extern "C" fn( + eohptr: *mut ExpandedObjectHeader, + result: *mut ::std::os::raw::c_void, + allocated_size: Size, + ), +>; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct ExpandedObjectMethods { + pub get_flat_size: EOM_get_flat_size_method, + pub flatten_into: EOM_flatten_into_method, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ExpandedObjectHeader { + pub vl_len_: int32, + pub eoh_methods: *const ExpandedObjectMethods, + pub eoh_context: MemoryContext, + pub eoh_rw_ptr: [::std::os::raw::c_char; 10usize], + pub eoh_ro_ptr: [::std::os::raw::c_char; 10usize], +} +impl Default for ExpandedObjectHeader { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } #[pg_guard] extern "C" { - pub fn ExtractSetVariableArgs(stmt: *mut VariableSetStmt) -> *mut ::std::os::raw::c_char; + pub fn DatumGetEOHP(d: Datum) -> *mut ExpandedObjectHeader; } #[pg_guard] extern "C" { - pub fn ProcessGUCArray( - array: *mut ArrayType, - context: GucContext, - source: GucSource, - action: GucAction, + pub fn EOH_init_header( + eohptr: *mut ExpandedObjectHeader, + methods: *const ExpandedObjectMethods, + obj_context: MemoryContext, ); } #[pg_guard] extern "C" { - pub fn GUCArrayAdd( - array: *mut ArrayType, - name: *const ::std::os::raw::c_char, - value: *const ::std::os::raw::c_char, - ) -> *mut ArrayType; + pub fn EOH_get_flat_size(eohptr: *mut ExpandedObjectHeader) -> Size; } #[pg_guard] extern "C" { - pub fn GUCArrayDelete( - array: *mut ArrayType, - name: *const ::std::os::raw::c_char, - ) -> *mut ArrayType; + pub fn EOH_flatten_into( + eohptr: *mut ExpandedObjectHeader, + result: *mut ::std::os::raw::c_void, + allocated_size: Size, + ); } #[pg_guard] extern "C" { - pub fn GUCArrayReset(array: *mut ArrayType) -> *mut ArrayType; + pub fn MakeExpandedObjectReadOnlyInternal(d: Datum) -> Datum; } #[pg_guard] extern "C" { - pub fn EstimateGUCStateSpace() -> Size; + pub fn TransferExpandedObject(d: Datum, new_parent: MemoryContext) -> Datum; } #[pg_guard] extern "C" { - pub fn SerializeGUCState(maxsize: Size, start_address: *mut ::std::os::raw::c_char); + pub fn DeleteExpandedObject(d: Datum); } -#[pg_guard] -extern "C" { - pub fn RestoreGUCState(gucstate: *mut ::std::os::raw::c_void); +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct ArrayType { + pub vl_len_: int32, + pub ndim: ::std::os::raw::c_int, + pub dataoffset: int32, + pub elemtype: Oid, } -#[pg_guard] -extern "C" { - pub static mut GUC_check_errmsg_string: *mut ::std::os::raw::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ExpandedArrayHeader { + pub hdr: ExpandedObjectHeader, + pub ea_magic: ::std::os::raw::c_int, + pub ndims: ::std::os::raw::c_int, + pub dims: *mut ::std::os::raw::c_int, + pub lbound: *mut ::std::os::raw::c_int, + pub element_type: Oid, + pub typlen: int16, + pub typbyval: bool, + pub typalign: ::std::os::raw::c_char, + pub dvalues: *mut Datum, + pub dnulls: *mut bool, + pub dvalueslen: ::std::os::raw::c_int, + pub nelems: ::std::os::raw::c_int, + pub flat_size: Size, + pub fvalue: *mut ArrayType, + pub fstartptr: *mut ::std::os::raw::c_char, + pub fendptr: *mut ::std::os::raw::c_char, } -#[pg_guard] -extern "C" { - pub static mut GUC_check_errdetail_string: *mut ::std::os::raw::c_char; +impl Default for ExpandedArrayHeader { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub static mut GUC_check_errhint_string: *mut ::std::os::raw::c_char; +#[repr(C)] +#[derive(Copy, Clone)] +pub union AnyArrayType { + pub flt: ArrayType, + pub xpn: ExpandedArrayHeader, + _bindgen_union_align: [u64; 17usize], } -#[pg_guard] -extern "C" { - pub fn GUC_check_errcode(sqlerrcode: ::std::os::raw::c_int); +impl Default for AnyArrayType { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn check_default_tablespace( - newval: *mut *mut ::std::os::raw::c_char, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayBuildState { + pub mcontext: MemoryContext, + pub dvalues: *mut Datum, + pub dnulls: *mut bool, + pub alen: ::std::os::raw::c_int, + pub nelems: ::std::os::raw::c_int, + pub element_type: Oid, + pub typlen: int16, + pub typbyval: bool, + pub typalign: ::std::os::raw::c_char, + pub private_cxt: bool, } -#[pg_guard] -extern "C" { - pub fn check_temp_tablespaces( - newval: *mut *mut ::std::os::raw::c_char, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool; +impl Default for ArrayBuildState { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn assign_temp_tablespaces( - newval: *const ::std::os::raw::c_char, - extra: *mut ::std::os::raw::c_void, - ); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayBuildStateArr { + pub mcontext: MemoryContext, + pub data: *mut ::std::os::raw::c_char, + pub nullbitmap: *mut bits8, + pub abytes: ::std::os::raw::c_int, + pub nbytes: ::std::os::raw::c_int, + pub aitems: ::std::os::raw::c_int, + pub nitems: ::std::os::raw::c_int, + pub ndims: ::std::os::raw::c_int, + pub dims: [::std::os::raw::c_int; 6usize], + pub lbs: [::std::os::raw::c_int; 6usize], + pub array_type: Oid, + pub element_type: Oid, + pub private_cxt: bool, } -#[pg_guard] -extern "C" { - pub fn check_search_path( - newval: *mut *mut ::std::os::raw::c_char, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool; +impl Default for ArrayBuildStateArr { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn assign_search_path( - newval: *const ::std::os::raw::c_char, - extra: *mut ::std::os::raw::c_void, - ); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayBuildStateAny { + pub scalarstate: *mut ArrayBuildState, + pub arraystate: *mut ArrayBuildStateArr, +} +impl Default for ArrayBuildStateAny { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayMetaState { + pub element_type: Oid, + pub typlen: int16, + pub typbyval: bool, + pub typalign: ::std::os::raw::c_char, + pub typdelim: ::std::os::raw::c_char, + pub typioparam: Oid, + pub typiofunc: Oid, + pub proc_: FmgrInfo, +} +impl Default for ArrayMetaState { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayMapState { + pub inp_extra: ArrayMetaState, + pub ret_extra: ArrayMetaState, +} +impl Default for ArrayMapState { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayIteratorData { + _unused: [u8; 0], +} +pub type ArrayIterator = *mut ArrayIteratorData; #[pg_guard] extern "C" { - pub fn check_wal_buffers( - newval: *mut ::std::os::raw::c_int, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool; + pub static mut Array_nulls: bool; } #[pg_guard] extern "C" { - pub fn assign_xlog_sync_method( - new_sync_method: ::std::os::raw::c_int, - extra: *mut ::std::os::raw::c_void, + pub fn CopyArrayEls( + array: *mut ArrayType, + values: *mut Datum, + nulls: *mut bool, + nitems: ::std::os::raw::c_int, + typlen: ::std::os::raw::c_int, + typbyval: bool, + typalign: ::std::os::raw::c_char, + freedata: bool, ); } #[pg_guard] extern "C" { - pub fn XLogBeginInsert(); + pub fn array_get_element( + arraydatum: Datum, + nSubscripts: ::std::os::raw::c_int, + indx: *mut ::std::os::raw::c_int, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + isNull: *mut bool, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogSetRecordFlags(flags: uint8); + pub fn array_set_element( + arraydatum: Datum, + nSubscripts: ::std::os::raw::c_int, + indx: *mut ::std::os::raw::c_int, + dataValue: Datum, + isNull: bool, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogInsert(rmid: RmgrId, info: uint8) -> XLogRecPtr; + pub fn array_get_slice( + arraydatum: Datum, + nSubscripts: ::std::os::raw::c_int, + upperIndx: *mut ::std::os::raw::c_int, + lowerIndx: *mut ::std::os::raw::c_int, + upperProvided: *mut bool, + lowerProvided: *mut bool, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogEnsureRecordSpace(nbuffers: ::std::os::raw::c_int, ndatas: ::std::os::raw::c_int); + pub fn array_set_slice( + arraydatum: Datum, + nSubscripts: ::std::os::raw::c_int, + upperIndx: *mut ::std::os::raw::c_int, + lowerIndx: *mut ::std::os::raw::c_int, + upperProvided: *mut bool, + lowerProvided: *mut bool, + srcArrayDatum: Datum, + isNull: bool, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogRegisterData(data: *mut ::std::os::raw::c_char, len: ::std::os::raw::c_int); + pub fn array_ref( + array: *mut ArrayType, + nSubscripts: ::std::os::raw::c_int, + indx: *mut ::std::os::raw::c_int, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + isNull: *mut bool, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogRegisterBuffer(block_id: uint8, buffer: Buffer, flags: uint8); + pub fn array_set( + array: *mut ArrayType, + nSubscripts: ::std::os::raw::c_int, + indx: *mut ::std::os::raw::c_int, + dataValue: Datum, + isNull: bool, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn XLogRegisterBlock( - block_id: uint8, - rnode: *mut RelFileNode, - forknum: ForkNumber, - blknum: BlockNumber, - page: *mut ::std::os::raw::c_char, - flags: uint8, - ); + pub fn array_map( + arrayd: Datum, + exprstate: *mut ExprState, + econtext: *mut ExprContext, + retType: Oid, + amstate: *mut ArrayMapState, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogRegisterBufData( - block_id: uint8, - data: *mut ::std::os::raw::c_char, - len: ::std::os::raw::c_int, + pub fn array_bitmap_copy( + destbitmap: *mut bits8, + destoffset: ::std::os::raw::c_int, + srcbitmap: *const bits8, + srcoffset: ::std::os::raw::c_int, + nitems: ::std::os::raw::c_int, ); } #[pg_guard] extern "C" { - pub fn XLogResetInsertion(); + pub fn construct_array( + elems: *mut Datum, + nelems: ::std::os::raw::c_int, + elmtype: Oid, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn XLogCheckBufferNeedsBackup(buffer: Buffer) -> bool; + pub fn construct_md_array( + elems: *mut Datum, + nulls: *mut bool, + ndims: ::std::os::raw::c_int, + dims: *mut ::std::os::raw::c_int, + lbs: *mut ::std::os::raw::c_int, + elmtype: Oid, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn log_newpage( - rnode: *mut RelFileNode, - forkNum: ForkNumber, - blk: BlockNumber, - page: *mut ::std::os::raw::c_char, - page_std: bool, - ) -> XLogRecPtr; + pub fn construct_empty_array(elmtype: Oid) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn log_newpage_buffer(buffer: Buffer, page_std: bool) -> XLogRecPtr; + pub fn construct_empty_expanded_array( + element_type: Oid, + parentcontext: MemoryContext, + metacache: *mut ArrayMetaState, + ) -> *mut ExpandedArrayHeader; } #[pg_guard] extern "C" { - pub fn log_newpage_range( - rel: Relation, - forkNum: ForkNumber, - startblk: BlockNumber, - endblk: BlockNumber, - page_std: bool, + pub fn deconstruct_array( + array: *mut ArrayType, + elmtype: Oid, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + elemsp: *mut *mut Datum, + nullsp: *mut *mut bool, + nelemsp: *mut ::std::os::raw::c_int, ); } #[pg_guard] extern "C" { - pub fn XLogSaveBufferForHint(buffer: Buffer, buffer_std: bool) -> XLogRecPtr; -} -#[pg_guard] -extern "C" { - pub fn InitXLogInsert(); + pub fn array_contains_nulls(array: *mut ArrayType) -> bool; } #[pg_guard] extern "C" { - pub static mut sync_method: ::std::os::raw::c_int; + pub fn initArrayResult( + element_type: Oid, + rcontext: MemoryContext, + subcontext: bool, + ) -> *mut ArrayBuildState; } #[pg_guard] extern "C" { - pub static mut ThisTimeLineID: TimeLineID; + pub fn accumArrayResult( + astate: *mut ArrayBuildState, + dvalue: Datum, + disnull: bool, + element_type: Oid, + rcontext: MemoryContext, + ) -> *mut ArrayBuildState; } #[pg_guard] extern "C" { - pub static mut InRecovery: bool; + pub fn makeArrayResult(astate: *mut ArrayBuildState, rcontext: MemoryContext) -> Datum; } -pub const HotStandbyState_STANDBY_DISABLED: HotStandbyState = 0; -pub const HotStandbyState_STANDBY_INITIALIZED: HotStandbyState = 1; -pub const HotStandbyState_STANDBY_SNAPSHOT_PENDING: HotStandbyState = 2; -pub const HotStandbyState_STANDBY_SNAPSHOT_READY: HotStandbyState = 3; -pub type HotStandbyState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut standbyState: HotStandbyState; + pub fn makeMdArrayResult( + astate: *mut ArrayBuildState, + ndims: ::std::os::raw::c_int, + dims: *mut ::std::os::raw::c_int, + lbs: *mut ::std::os::raw::c_int, + rcontext: MemoryContext, + release: bool, + ) -> Datum; } -pub const RecoveryTargetType_RECOVERY_TARGET_UNSET: RecoveryTargetType = 0; -pub const RecoveryTargetType_RECOVERY_TARGET_XID: RecoveryTargetType = 1; -pub const RecoveryTargetType_RECOVERY_TARGET_TIME: RecoveryTargetType = 2; -pub const RecoveryTargetType_RECOVERY_TARGET_NAME: RecoveryTargetType = 3; -pub const RecoveryTargetType_RECOVERY_TARGET_LSN: RecoveryTargetType = 4; -pub const RecoveryTargetType_RECOVERY_TARGET_IMMEDIATE: RecoveryTargetType = 5; -pub type RecoveryTargetType = ::std::os::raw::c_uint; -pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_CONTROLFILE: - RecoveryTargetTimeLineGoal = 0; -pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_LATEST: RecoveryTargetTimeLineGoal = - 1; -pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_NUMERIC: RecoveryTargetTimeLineGoal = - 2; -pub type RecoveryTargetTimeLineGoal = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut ProcLastRecPtr: XLogRecPtr; + pub fn initArrayResultArr( + array_type: Oid, + element_type: Oid, + rcontext: MemoryContext, + subcontext: bool, + ) -> *mut ArrayBuildStateArr; } #[pg_guard] extern "C" { - pub static mut XactLastRecEnd: XLogRecPtr; + pub fn accumArrayResultArr( + astate: *mut ArrayBuildStateArr, + dvalue: Datum, + disnull: bool, + array_type: Oid, + rcontext: MemoryContext, + ) -> *mut ArrayBuildStateArr; } #[pg_guard] extern "C" { - pub static mut XactLastCommitEnd: XLogRecPtr; + pub fn makeArrayResultArr( + astate: *mut ArrayBuildStateArr, + rcontext: MemoryContext, + release: bool, + ) -> Datum; } #[pg_guard] extern "C" { - pub static mut reachedConsistency: bool; + pub fn initArrayResultAny( + input_type: Oid, + rcontext: MemoryContext, + subcontext: bool, + ) -> *mut ArrayBuildStateAny; } #[pg_guard] extern "C" { - pub static mut wal_segment_size: ::std::os::raw::c_int; + pub fn accumArrayResultAny( + astate: *mut ArrayBuildStateAny, + dvalue: Datum, + disnull: bool, + input_type: Oid, + rcontext: MemoryContext, + ) -> *mut ArrayBuildStateAny; } #[pg_guard] extern "C" { - pub static mut min_wal_size_mb: ::std::os::raw::c_int; + pub fn makeArrayResultAny( + astate: *mut ArrayBuildStateAny, + rcontext: MemoryContext, + release: bool, + ) -> Datum; } #[pg_guard] extern "C" { - pub static mut max_wal_size_mb: ::std::os::raw::c_int; + pub fn array_create_iterator( + arr: *mut ArrayType, + slice_ndim: ::std::os::raw::c_int, + mstate: *mut ArrayMetaState, + ) -> ArrayIterator; } #[pg_guard] extern "C" { - pub static mut wal_keep_segments: ::std::os::raw::c_int; + pub fn array_iterate(iterator: ArrayIterator, value: *mut Datum, isnull: *mut bool) -> bool; } #[pg_guard] extern "C" { - pub static mut XLOGbuffers: ::std::os::raw::c_int; + pub fn array_free_iterator(iterator: ArrayIterator); } #[pg_guard] extern "C" { - pub static mut XLogArchiveTimeout: ::std::os::raw::c_int; + pub fn ArrayGetOffset( + n: ::std::os::raw::c_int, + dim: *const ::std::os::raw::c_int, + lb: *const ::std::os::raw::c_int, + indx: *const ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut wal_retrieve_retry_interval: ::std::os::raw::c_int; + pub fn ArrayGetOffset0( + n: ::std::os::raw::c_int, + tup: *const ::std::os::raw::c_int, + scale: *const ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut XLogArchiveCommand: *mut ::std::os::raw::c_char; + pub fn ArrayGetNItems( + ndim: ::std::os::raw::c_int, + dims: *const ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut EnableHotStandby: bool; + pub fn mda_get_range( + n: ::std::os::raw::c_int, + span: *mut ::std::os::raw::c_int, + st: *const ::std::os::raw::c_int, + endp: *const ::std::os::raw::c_int, + ); } #[pg_guard] extern "C" { - pub static mut fullPageWrites: bool; + pub fn mda_get_prod( + n: ::std::os::raw::c_int, + range: *const ::std::os::raw::c_int, + prod: *mut ::std::os::raw::c_int, + ); } #[pg_guard] extern "C" { - pub static mut wal_log_hints: bool; + pub fn mda_get_offset_values( + n: ::std::os::raw::c_int, + dist: *mut ::std::os::raw::c_int, + prod: *const ::std::os::raw::c_int, + span: *const ::std::os::raw::c_int, + ); } #[pg_guard] extern "C" { - pub static mut wal_compression: bool; + pub fn mda_next_tuple( + n: ::std::os::raw::c_int, + curr: *mut ::std::os::raw::c_int, + span: *const ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut wal_init_zero: bool; + pub fn ArrayGetIntegerTypmods(arr: *mut ArrayType, n: *mut ::std::os::raw::c_int) + -> *mut int32; } #[pg_guard] extern "C" { - pub static mut wal_recycle: bool; + pub fn expand_array( + arraydatum: Datum, + parentcontext: MemoryContext, + metacache: *mut ArrayMetaState, + ) -> Datum; } #[pg_guard] extern "C" { - pub static mut wal_consistency_checking: *mut bool; + pub fn DatumGetExpandedArray(d: Datum) -> *mut ExpandedArrayHeader; } #[pg_guard] extern "C" { - pub static mut wal_consistency_checking_string: *mut ::std::os::raw::c_char; + pub fn DatumGetExpandedArrayX( + d: Datum, + metacache: *mut ArrayMetaState, + ) -> *mut ExpandedArrayHeader; } #[pg_guard] extern "C" { - pub static mut log_checkpoints: bool; + pub fn DatumGetAnyArrayP(d: Datum) -> *mut AnyArrayType; } #[pg_guard] extern "C" { - pub static mut recoveryRestoreCommand: *mut ::std::os::raw::c_char; + pub fn deconstruct_expanded_array(eah: *mut ExpandedArrayHeader); +} +pub const GucContext_PGC_INTERNAL: GucContext = 0; +pub const GucContext_PGC_POSTMASTER: GucContext = 1; +pub const GucContext_PGC_SIGHUP: GucContext = 2; +pub const GucContext_PGC_SU_BACKEND: GucContext = 3; +pub const GucContext_PGC_BACKEND: GucContext = 4; +pub const GucContext_PGC_SUSET: GucContext = 5; +pub const GucContext_PGC_USERSET: GucContext = 6; +pub type GucContext = ::std::os::raw::c_uint; +pub const GucSource_PGC_S_DEFAULT: GucSource = 0; +pub const GucSource_PGC_S_DYNAMIC_DEFAULT: GucSource = 1; +pub const GucSource_PGC_S_ENV_VAR: GucSource = 2; +pub const GucSource_PGC_S_FILE: GucSource = 3; +pub const GucSource_PGC_S_ARGV: GucSource = 4; +pub const GucSource_PGC_S_GLOBAL: GucSource = 5; +pub const GucSource_PGC_S_DATABASE: GucSource = 6; +pub const GucSource_PGC_S_USER: GucSource = 7; +pub const GucSource_PGC_S_DATABASE_USER: GucSource = 8; +pub const GucSource_PGC_S_CLIENT: GucSource = 9; +pub const GucSource_PGC_S_OVERRIDE: GucSource = 10; +pub const GucSource_PGC_S_INTERACTIVE: GucSource = 11; +pub const GucSource_PGC_S_TEST: GucSource = 12; +pub const GucSource_PGC_S_SESSION: GucSource = 13; +pub type GucSource = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ConfigVariable { + pub name: *mut ::std::os::raw::c_char, + pub value: *mut ::std::os::raw::c_char, + pub errmsg: *mut ::std::os::raw::c_char, + pub filename: *mut ::std::os::raw::c_char, + pub sourceline: ::std::os::raw::c_int, + pub ignore: bool, + pub applied: bool, + pub next: *mut ConfigVariable, +} +impl Default for ConfigVariable { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } #[pg_guard] extern "C" { - pub static mut recoveryEndCommand: *mut ::std::os::raw::c_char; + pub fn ParseConfigFile( + config_file: *const ::std::os::raw::c_char, + strict: bool, + calling_file: *const ::std::os::raw::c_char, + calling_lineno: ::std::os::raw::c_int, + depth: ::std::os::raw::c_int, + elevel: ::std::os::raw::c_int, + head_p: *mut *mut ConfigVariable, + tail_p: *mut *mut ConfigVariable, + ) -> bool; } #[pg_guard] extern "C" { - pub static mut archiveCleanupCommand: *mut ::std::os::raw::c_char; + pub fn ParseConfigFp( + fp: *mut FILE, + config_file: *const ::std::os::raw::c_char, + depth: ::std::os::raw::c_int, + elevel: ::std::os::raw::c_int, + head_p: *mut *mut ConfigVariable, + tail_p: *mut *mut ConfigVariable, + ) -> bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetInclusive: bool; + pub fn ParseConfigDirectory( + includedir: *const ::std::os::raw::c_char, + calling_file: *const ::std::os::raw::c_char, + calling_lineno: ::std::os::raw::c_int, + depth: ::std::os::raw::c_int, + elevel: ::std::os::raw::c_int, + head_p: *mut *mut ConfigVariable, + tail_p: *mut *mut ConfigVariable, + ) -> bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetAction: ::std::os::raw::c_int; + pub fn FreeConfigVariables(list: *mut ConfigVariable); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct config_enum_entry { + pub name: *const ::std::os::raw::c_char, + pub val: ::std::os::raw::c_int, + pub hidden: bool, +} +impl Default for config_enum_entry { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } +pub type GucBoolCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut bool, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucIntCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut ::std::os::raw::c_int, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucRealCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut f64, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucStringCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut *mut ::std::os::raw::c_char, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucEnumCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut ::std::os::raw::c_int, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucBoolAssignHook = + ::std::option::Option; +pub type GucIntAssignHook = ::std::option::Option< + unsafe extern "C" fn(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void), +>; +pub type GucRealAssignHook = + ::std::option::Option; +pub type GucStringAssignHook = ::std::option::Option< + unsafe extern "C" fn(newval: *const ::std::os::raw::c_char, extra: *mut ::std::os::raw::c_void), +>; +pub type GucEnumAssignHook = ::std::option::Option< + unsafe extern "C" fn(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void), +>; +pub type GucShowHook = + ::std::option::Option *const ::std::os::raw::c_char>; +pub const GucAction_GUC_ACTION_SET: GucAction = 0; +pub const GucAction_GUC_ACTION_LOCAL: GucAction = 1; +pub const GucAction_GUC_ACTION_SAVE: GucAction = 2; +pub type GucAction = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut recovery_min_apply_delay: ::std::os::raw::c_int; + pub static mut log_duration: bool; } #[pg_guard] extern "C" { - pub static mut PrimaryConnInfo: *mut ::std::os::raw::c_char; + pub static mut Debug_print_plan: bool; } #[pg_guard] extern "C" { - pub static mut PrimarySlotName: *mut ::std::os::raw::c_char; + pub static mut Debug_print_parse: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetXid: TransactionId; + pub static mut Debug_print_rewritten: bool; } #[pg_guard] extern "C" { - pub static mut recovery_target_time_string: *mut ::std::os::raw::c_char; + pub static mut Debug_pretty_print: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetName: *const ::std::os::raw::c_char; + pub static mut log_parser_stats: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetLSN: XLogRecPtr; + pub static mut log_planner_stats: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTarget: RecoveryTargetType; + pub static mut log_executor_stats: bool; } #[pg_guard] extern "C" { - pub static mut PromoteTriggerFile: *mut ::std::os::raw::c_char; + pub static mut log_statement_stats: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetTimeLineGoal: RecoveryTargetTimeLineGoal; + pub static mut log_btree_build_stats: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetTLIRequested: TimeLineID; + pub static mut check_function_bodies: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetTLI: TimeLineID; + pub static mut session_auth_is_superuser: bool; } #[pg_guard] extern "C" { - pub static mut CheckPointSegments: ::std::os::raw::c_int; + pub static mut log_min_error_statement: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut StandbyModeRequested: bool; + pub static mut log_min_messages: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut StandbyMode: bool; + pub static mut client_min_messages: ::std::os::raw::c_int; } -pub const ArchiveMode_ARCHIVE_MODE_OFF: ArchiveMode = 0; -pub const ArchiveMode_ARCHIVE_MODE_ON: ArchiveMode = 1; -pub const ArchiveMode_ARCHIVE_MODE_ALWAYS: ArchiveMode = 2; -pub type ArchiveMode = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut XLogArchiveMode: ::std::os::raw::c_int; + pub static mut log_min_duration_statement: ::std::os::raw::c_int; } -pub const WalLevel_WAL_LEVEL_MINIMAL: WalLevel = 0; -pub const WalLevel_WAL_LEVEL_REPLICA: WalLevel = 1; -pub const WalLevel_WAL_LEVEL_LOGICAL: WalLevel = 2; -pub type WalLevel = ::std::os::raw::c_uint; -pub const RecoveryState_RECOVERY_STATE_CRASH: RecoveryState = 0; -pub const RecoveryState_RECOVERY_STATE_ARCHIVE: RecoveryState = 1; -pub const RecoveryState_RECOVERY_STATE_DONE: RecoveryState = 2; -pub type RecoveryState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut wal_level: ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct CheckpointStatsData { - pub ckpt_start_t: TimestampTz, - pub ckpt_write_t: TimestampTz, - pub ckpt_sync_t: TimestampTz, - pub ckpt_sync_end_t: TimestampTz, - pub ckpt_end_t: TimestampTz, - pub ckpt_bufs_written: ::std::os::raw::c_int, - pub ckpt_segs_added: ::std::os::raw::c_int, - pub ckpt_segs_removed: ::std::os::raw::c_int, - pub ckpt_segs_recycled: ::std::os::raw::c_int, - pub ckpt_sync_rels: ::std::os::raw::c_int, - pub ckpt_longest_sync: uint64, - pub ckpt_agg_sync_time: uint64, + pub static mut log_temp_files: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut CheckpointStats: CheckpointStatsData; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XLogRecData { - _unused: [u8; 0], + pub static mut log_xact_sample_rate: f64; } #[pg_guard] extern "C" { - pub fn XLogInsertRecord( - rdata: *mut XLogRecData, - fpw_lsn: XLogRecPtr, - flags: uint8, - ) -> XLogRecPtr; + pub static mut temp_file_limit: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn XLogFlush(RecPtr: XLogRecPtr); + pub static mut num_temp_buffers: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn XLogBackgroundFlush() -> bool; + pub static mut cluster_name: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogNeedsFlush(RecPtr: XLogRecPtr) -> bool; + pub static mut ConfigFileName: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogFileInit( - segno: XLogSegNo, - use_existent: *mut bool, - use_lock: bool, - ) -> ::std::os::raw::c_int; + pub static mut HbaFileName: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogFileOpen(segno: XLogSegNo) -> ::std::os::raw::c_int; + pub static mut IdentFileName: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn CheckXLogRemoved(segno: XLogSegNo, tli: TimeLineID); + pub static mut external_pid_file: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogGetLastRemovedSegno() -> XLogSegNo; + pub static mut application_name: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogSetAsyncXactLSN(record: XLogRecPtr); + pub static mut tcp_keepalives_idle: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn XLogSetReplicationSlotMinimumLSN(lsn: XLogRecPtr); + pub static mut tcp_keepalives_interval: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn xlog_redo(record: *mut XLogReaderState); + pub static mut tcp_keepalives_count: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn xlog_desc(buf: StringInfo, record: *mut XLogReaderState); + pub static mut tcp_user_timeout: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn xlog_identify(info: uint8) -> *const ::std::os::raw::c_char; + pub static mut trace_sort: bool; } #[pg_guard] extern "C" { - pub fn issue_xlog_fsync(fd: ::std::os::raw::c_int, segno: XLogSegNo); + pub fn SetConfigOption( + name: *const ::std::os::raw::c_char, + value: *const ::std::os::raw::c_char, + context: GucContext, + source: GucSource, + ); } #[pg_guard] extern "C" { - pub fn RecoveryInProgress() -> bool; + pub fn DefineCustomBoolVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut bool, + bootValue: bool, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucBoolCheckHook, + assign_hook: GucBoolAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn GetRecoveryState() -> RecoveryState; + pub fn DefineCustomIntVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut ::std::os::raw::c_int, + bootValue: ::std::os::raw::c_int, + minValue: ::std::os::raw::c_int, + maxValue: ::std::os::raw::c_int, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucIntCheckHook, + assign_hook: GucIntAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn HotStandbyActive() -> bool; + pub fn DefineCustomRealVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut f64, + bootValue: f64, + minValue: f64, + maxValue: f64, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucRealCheckHook, + assign_hook: GucRealAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn HotStandbyActiveInReplay() -> bool; + pub fn DefineCustomStringVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut *mut ::std::os::raw::c_char, + bootValue: *const ::std::os::raw::c_char, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucStringCheckHook, + assign_hook: GucStringAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn XLogInsertAllowed() -> bool; + pub fn DefineCustomEnumVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut ::std::os::raw::c_int, + bootValue: ::std::os::raw::c_int, + options: *const config_enum_entry, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucEnumCheckHook, + assign_hook: GucEnumAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn GetXLogReceiptTime(rtime: *mut TimestampTz, fromStream: *mut bool); + pub fn EmitWarningsOnPlaceholders(className: *const ::std::os::raw::c_char); } #[pg_guard] extern "C" { - pub fn GetXLogReplayRecPtr(replayTLI: *mut TimeLineID) -> XLogRecPtr; + pub fn GetConfigOption( + name: *const ::std::os::raw::c_char, + missing_ok: bool, + restrict_privileged: bool, + ) -> *const ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn GetXLogInsertRecPtr() -> XLogRecPtr; + pub fn GetConfigOptionResetString( + name: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn GetXLogWriteRecPtr() -> XLogRecPtr; + pub fn GetConfigOptionFlags( + name: *const ::std::os::raw::c_char, + missing_ok: bool, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn RecoveryIsPaused() -> bool; + pub fn ProcessConfigFile(context: GucContext); } #[pg_guard] extern "C" { - pub fn SetRecoveryPause(recoveryPause: bool); + pub fn InitializeGUCOptions(); } #[pg_guard] extern "C" { - pub fn GetLatestXTime() -> TimestampTz; + pub fn SelectConfigFiles( + userDoption: *const ::std::os::raw::c_char, + progname: *const ::std::os::raw::c_char, + ) -> bool; } #[pg_guard] extern "C" { - pub fn GetCurrentChunkReplayStartTime() -> TimestampTz; + pub fn ResetAllOptions(); } #[pg_guard] extern "C" { - pub fn XLogFileNameP(tli: TimeLineID, segno: XLogSegNo) -> *mut ::std::os::raw::c_char; + pub fn AtStart_GUC(); } #[pg_guard] extern "C" { - pub fn UpdateControlFile(); + pub fn NewGUCNestLevel() -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn GetSystemIdentifier() -> uint64; + pub fn AtEOXact_GUC(isCommit: bool, nestLevel: ::std::os::raw::c_int); } #[pg_guard] extern "C" { - pub fn GetMockAuthenticationNonce() -> *mut ::std::os::raw::c_char; + pub fn BeginReportingGUCOptions(); } #[pg_guard] extern "C" { - pub fn DataChecksumsEnabled() -> bool; + pub fn ParseLongOption( + string: *const ::std::os::raw::c_char, + name: *mut *mut ::std::os::raw::c_char, + value: *mut *mut ::std::os::raw::c_char, + ); } #[pg_guard] extern "C" { - pub fn GetFakeLSNForUnloggedRel() -> XLogRecPtr; + pub fn parse_int( + value: *const ::std::os::raw::c_char, + result: *mut ::std::os::raw::c_int, + flags: ::std::os::raw::c_int, + hintmsg: *mut *const ::std::os::raw::c_char, + ) -> bool; } #[pg_guard] extern "C" { - pub fn XLOGShmemSize() -> Size; + pub fn parse_real( + value: *const ::std::os::raw::c_char, + result: *mut f64, + flags: ::std::os::raw::c_int, + hintmsg: *mut *const ::std::os::raw::c_char, + ) -> bool; } #[pg_guard] extern "C" { - pub fn XLOGShmemInit(); + pub fn set_config_option( + name: *const ::std::os::raw::c_char, + value: *const ::std::os::raw::c_char, + context: GucContext, + source: GucSource, + action: GucAction, + changeVal: bool, + elevel: ::std::os::raw::c_int, + is_reload: bool, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn BootStrapXLOG(); + pub fn AlterSystemSetConfigFile(setstmt: *mut AlterSystemStmt); } #[pg_guard] extern "C" { - pub fn LocalProcessControlFile(reset: bool); + pub fn GetConfigOptionByName( + name: *const ::std::os::raw::c_char, + varname: *mut *const ::std::os::raw::c_char, + missing_ok: bool, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn StartupXLOG(); + pub fn GetConfigOptionByNum( + varnum: ::std::os::raw::c_int, + values: *mut *const ::std::os::raw::c_char, + noshow: *mut bool, + ); } #[pg_guard] extern "C" { - pub fn ShutdownXLOG(code: ::std::os::raw::c_int, arg: Datum); + pub fn GetNumConfigOptions() -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn InitXLOGAccess(); + pub fn SetPGVariable(name: *const ::std::os::raw::c_char, args: *mut List, is_local: bool); } #[pg_guard] extern "C" { - pub fn CreateCheckPoint(flags: ::std::os::raw::c_int); + pub fn GetPGVariable(name: *const ::std::os::raw::c_char, dest: *mut DestReceiver); } #[pg_guard] extern "C" { - pub fn CreateRestartPoint(flags: ::std::os::raw::c_int) -> bool; + pub fn GetPGVariableResultDesc(name: *const ::std::os::raw::c_char) -> TupleDesc; } #[pg_guard] extern "C" { - pub fn XLogPutNextOid(nextOid: Oid); + pub fn ExecSetVariableStmt(stmt: *mut VariableSetStmt, isTopLevel: bool); } #[pg_guard] extern "C" { - pub fn XLogRestorePoint(rpName: *const ::std::os::raw::c_char) -> XLogRecPtr; + pub fn ExtractSetVariableArgs(stmt: *mut VariableSetStmt) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn UpdateFullPageWrites(); + pub fn ProcessGUCArray( + array: *mut ArrayType, + context: GucContext, + source: GucSource, + action: GucAction, + ); } #[pg_guard] extern "C" { - pub fn GetFullPageWriteInfo(RedoRecPtr_p: *mut XLogRecPtr, doPageWrites_p: *mut bool); + pub fn GUCArrayAdd( + array: *mut ArrayType, + name: *const ::std::os::raw::c_char, + value: *const ::std::os::raw::c_char, + ) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn GetRedoRecPtr() -> XLogRecPtr; + pub fn GUCArrayDelete( + array: *mut ArrayType, + name: *const ::std::os::raw::c_char, + ) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn GetInsertRecPtr() -> XLogRecPtr; + pub fn GUCArrayReset(array: *mut ArrayType) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn GetFlushRecPtr() -> XLogRecPtr; + pub fn EstimateGUCStateSpace() -> Size; } #[pg_guard] extern "C" { - pub fn GetLastImportantRecPtr() -> XLogRecPtr; + pub fn SerializeGUCState(maxsize: Size, start_address: *mut ::std::os::raw::c_char); } #[pg_guard] extern "C" { - pub fn RemovePromoteSignalFiles(); + pub fn RestoreGUCState(gucstate: *mut ::std::os::raw::c_void); } #[pg_guard] extern "C" { - pub fn CheckPromoteSignal() -> bool; + pub static mut GUC_check_errmsg_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn WakeupRecovery(); + pub static mut GUC_check_errdetail_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn SetWalWriterSleeping(sleeping: bool); + pub static mut GUC_check_errhint_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogRequestWalReceiverReply(); + pub fn GUC_check_errcode(sqlerrcode: ::std::os::raw::c_int); } #[pg_guard] extern "C" { - pub fn assign_max_wal_size(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void); + pub fn check_default_tablespace( + newval: *mut *mut ::std::os::raw::c_char, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool; } #[pg_guard] extern "C" { - pub fn assign_checkpoint_completion_target(newval: f64, extra: *mut ::std::os::raw::c_void); + pub fn check_temp_tablespaces( + newval: *mut *mut ::std::os::raw::c_char, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool; } -pub const SessionBackupState_SESSION_BACKUP_NONE: SessionBackupState = 0; -pub const SessionBackupState_SESSION_BACKUP_EXCLUSIVE: SessionBackupState = 1; -pub const SessionBackupState_SESSION_BACKUP_NON_EXCLUSIVE: SessionBackupState = 2; -pub type SessionBackupState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn do_pg_start_backup( - backupidstr: *const ::std::os::raw::c_char, - fast: bool, - starttli_p: *mut TimeLineID, - labelfile: StringInfo, - tablespaces: *mut *mut List, - tblspcmapfile: StringInfo, - infotbssize: bool, - needtblspcmapfile: bool, - ) -> XLogRecPtr; + pub fn assign_temp_tablespaces( + newval: *const ::std::os::raw::c_char, + extra: *mut ::std::os::raw::c_void, + ); } #[pg_guard] extern "C" { - pub fn do_pg_stop_backup( - labelfile: *mut ::std::os::raw::c_char, - waitforarchive: bool, - stoptli_p: *mut TimeLineID, - ) -> XLogRecPtr; + pub fn check_search_path( + newval: *mut *mut ::std::os::raw::c_char, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool; } #[pg_guard] extern "C" { - pub fn do_pg_abort_backup(code: ::std::os::raw::c_int, arg: Datum); + pub fn assign_search_path( + newval: *const ::std::os::raw::c_char, + extra: *mut ::std::os::raw::c_void, + ); } #[pg_guard] extern "C" { - pub fn register_persistent_abort_backup_handler(); + pub fn check_wal_buffers( + newval: *mut ::std::os::raw::c_int, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool; } #[pg_guard] extern "C" { - pub fn get_backup_status() -> SessionBackupState; + pub fn assign_xlog_sync_method( + new_sync_method: ::std::os::raw::c_int, + extra: *mut ::std::os::raw::c_void, + ); } #[repr(C)] #[derive(Copy, Clone)] diff --git a/pgx-pg-sys/src/pg13.rs b/pgx-pg-sys/src/pg13.rs index 8dc6d71c1..9f8b0f590 100644 --- a/pgx-pg-sys/src/pg13.rs +++ b/pgx-pg-sys/src/pg13.rs @@ -370,8 +370,8 @@ pub const PG_CACHE_LINE_SIZE: u32 = 128; pub const TRACE_SORT: u32 = 1; pub const __darwin__: u32 = 1; pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 0; -pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1; +pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_UNIX03: u32 = 1; pub const __DARWIN_64_BIT_INO_T: u32 = 1; pub const __DARWIN_VERS_1050: u32 = 1; @@ -416,9 +416,13 @@ pub const __MAC_10_13_4: u32 = 101304; pub const __MAC_10_14: u32 = 101400; pub const __MAC_10_14_1: u32 = 101401; pub const __MAC_10_14_4: u32 = 101404; +pub const __MAC_10_14_6: u32 = 101406; pub const __MAC_10_15: u32 = 101500; pub const __MAC_10_15_1: u32 = 101501; pub const __MAC_10_15_4: u32 = 101504; +pub const __MAC_10_16: u32 = 101600; +pub const __MAC_11_0: u32 = 110000; +pub const __MAC_11_1: u32 = 110100; pub const __IPHONE_2_0: u32 = 20000; pub const __IPHONE_2_1: u32 = 20100; pub const __IPHONE_2_2: u32 = 20200; @@ -457,6 +461,7 @@ pub const __IPHONE_12_0: u32 = 120000; pub const __IPHONE_12_1: u32 = 120100; pub const __IPHONE_12_2: u32 = 120200; pub const __IPHONE_12_3: u32 = 120300; +pub const __IPHONE_12_4: u32 = 120400; pub const __IPHONE_13_0: u32 = 130000; pub const __IPHONE_13_1: u32 = 130100; pub const __IPHONE_13_2: u32 = 130200; @@ -464,6 +469,11 @@ pub const __IPHONE_13_3: u32 = 130300; pub const __IPHONE_13_4: u32 = 130400; pub const __IPHONE_13_5: u32 = 130500; pub const __IPHONE_13_6: u32 = 130600; +pub const __IPHONE_13_7: u32 = 130700; +pub const __IPHONE_14_0: u32 = 140000; +pub const __IPHONE_14_1: u32 = 140100; +pub const __IPHONE_14_2: u32 = 140200; +pub const __IPHONE_14_3: u32 = 140300; pub const __TVOS_9_0: u32 = 90000; pub const __TVOS_9_1: u32 = 90100; pub const __TVOS_9_2: u32 = 90200; @@ -480,10 +490,15 @@ pub const __TVOS_12_0: u32 = 120000; pub const __TVOS_12_1: u32 = 120100; pub const __TVOS_12_2: u32 = 120200; pub const __TVOS_12_3: u32 = 120300; +pub const __TVOS_12_4: u32 = 120400; pub const __TVOS_13_0: u32 = 130000; pub const __TVOS_13_2: u32 = 130200; pub const __TVOS_13_3: u32 = 130300; pub const __TVOS_13_4: u32 = 130400; +pub const __TVOS_14_0: u32 = 140000; +pub const __TVOS_14_1: u32 = 140100; +pub const __TVOS_14_2: u32 = 140200; +pub const __TVOS_14_3: u32 = 140300; pub const __WATCHOS_1_0: u32 = 10000; pub const __WATCHOS_2_0: u32 = 20000; pub const __WATCHOS_2_1: u32 = 20100; @@ -499,11 +514,49 @@ pub const __WATCHOS_4_3: u32 = 40300; pub const __WATCHOS_5_0: u32 = 50000; pub const __WATCHOS_5_1: u32 = 50100; pub const __WATCHOS_5_2: u32 = 50200; +pub const __WATCHOS_5_3: u32 = 50300; pub const __WATCHOS_6_0: u32 = 60000; pub const __WATCHOS_6_1: u32 = 60100; pub const __WATCHOS_6_2: u32 = 60200; +pub const __WATCHOS_7_0: u32 = 70000; +pub const __WATCHOS_7_1: u32 = 70100; +pub const __WATCHOS_7_2: u32 = 70200; +pub const MAC_OS_X_VERSION_10_0: u32 = 1000; +pub const MAC_OS_X_VERSION_10_1: u32 = 1010; +pub const MAC_OS_X_VERSION_10_2: u32 = 1020; +pub const MAC_OS_X_VERSION_10_3: u32 = 1030; +pub const MAC_OS_X_VERSION_10_4: u32 = 1040; +pub const MAC_OS_X_VERSION_10_5: u32 = 1050; +pub const MAC_OS_X_VERSION_10_6: u32 = 1060; +pub const MAC_OS_X_VERSION_10_7: u32 = 1070; +pub const MAC_OS_X_VERSION_10_8: u32 = 1080; +pub const MAC_OS_X_VERSION_10_9: u32 = 1090; +pub const MAC_OS_X_VERSION_10_10: u32 = 101000; +pub const MAC_OS_X_VERSION_10_10_2: u32 = 101002; +pub const MAC_OS_X_VERSION_10_10_3: u32 = 101003; +pub const MAC_OS_X_VERSION_10_11: u32 = 101100; +pub const MAC_OS_X_VERSION_10_11_2: u32 = 101102; +pub const MAC_OS_X_VERSION_10_11_3: u32 = 101103; +pub const MAC_OS_X_VERSION_10_11_4: u32 = 101104; +pub const MAC_OS_X_VERSION_10_12: u32 = 101200; +pub const MAC_OS_X_VERSION_10_12_1: u32 = 101201; +pub const MAC_OS_X_VERSION_10_12_2: u32 = 101202; +pub const MAC_OS_X_VERSION_10_12_4: u32 = 101204; +pub const MAC_OS_X_VERSION_10_13: u32 = 101300; +pub const MAC_OS_X_VERSION_10_13_1: u32 = 101301; +pub const MAC_OS_X_VERSION_10_13_2: u32 = 101302; +pub const MAC_OS_X_VERSION_10_13_4: u32 = 101304; +pub const MAC_OS_X_VERSION_10_14: u32 = 101400; +pub const MAC_OS_X_VERSION_10_14_1: u32 = 101401; +pub const MAC_OS_X_VERSION_10_14_4: u32 = 101404; +pub const MAC_OS_X_VERSION_10_14_6: u32 = 101406; +pub const MAC_OS_X_VERSION_10_15: u32 = 101500; +pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501; +pub const MAC_OS_X_VERSION_10_16: u32 = 101600; +pub const MAC_OS_VERSION_11_0: u32 = 110000; pub const __DRIVERKIT_19_0: u32 = 190000; -pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 101500; +pub const __DRIVERKIT_20_0: u32 = 200000; +pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 110100; pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1; pub const __PTHREAD_SIZE__: u32 = 8176; pub const __PTHREAD_ATTR_SIZE__: u32 = 56; @@ -593,6 +646,9 @@ pub const FP_RND_DOWN: u32 = 1; pub const FP_RND_UP: u32 = 2; pub const FP_CHOP: u32 = 3; pub const FP_STATE_BYTES: u32 = 512; +pub const _X86_INSTRUCTION_STATE_MAX_INSN_BYTES: u32 = 2380; +pub const _X86_INSTRUCTION_STATE_CACHELINE_SIZE: u32 = 64; +pub const __LASTBRANCH_MAX: u32 = 32; pub const SIGEV_NONE: u32 = 0; pub const SIGEV_SIGNAL: u32 = 1; pub const SIGEV_THREAD: u32 = 3; @@ -726,7 +782,9 @@ pub const RUSAGE_INFO_V1: u32 = 1; pub const RUSAGE_INFO_V2: u32 = 2; pub const RUSAGE_INFO_V3: u32 = 3; pub const RUSAGE_INFO_V4: u32 = 4; -pub const RUSAGE_INFO_CURRENT: u32 = 4; +pub const RUSAGE_INFO_V5: u32 = 5; +pub const RUSAGE_INFO_CURRENT: u32 = 5; +pub const RU_PROC_RUNS_RESLIDE: u32 = 1; pub const RLIMIT_CPU: u32 = 0; pub const RLIMIT_FSIZE: u32 = 1; pub const RLIMIT_DATA: u32 = 2; @@ -754,6 +812,8 @@ pub const IOPOL_TYPE_DISK: u32 = 0; pub const IOPOL_TYPE_VFS_ATIME_UPDATES: u32 = 2; pub const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES: u32 = 3; pub const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME: u32 = 4; +pub const IOPOL_TYPE_VFS_TRIGGER_RESOLVE: u32 = 5; +pub const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION: u32 = 6; pub const IOPOL_SCOPE_PROCESS: u32 = 0; pub const IOPOL_SCOPE_THREAD: u32 = 1; pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2; @@ -772,6 +832,10 @@ pub const IOPOL_MATERIALIZE_DATALESS_FILES_OFF: u32 = 1; pub const IOPOL_MATERIALIZE_DATALESS_FILES_ON: u32 = 2; pub const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT: u32 = 0; pub const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME: u32 = 1; +pub const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT: u32 = 0; +pub const IOPOL_VFS_TRIGGER_RESOLVE_OFF: u32 = 1; +pub const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT: u32 = 0; +pub const IOPOL_VFS_CONTENT_PROTECTION_IGNORE: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WCOREFLAG: u32 = 128; @@ -1124,7 +1188,8 @@ pub const pseudo_AF_HDRCMPLT: u32 = 35; pub const AF_RESERVED_36: u32 = 36; pub const AF_IEEE80211: u32 = 37; pub const AF_UTUN: u32 = 38; -pub const AF_MAX: u32 = 40; +pub const AF_VSOCK: u32 = 40; +pub const AF_MAX: u32 = 41; pub const SOCK_MAXADDRLEN: u32 = 255; pub const _SS_MAXSIZE: u32 = 128; pub const PF_UNSPEC: u32 = 0; @@ -1165,8 +1230,9 @@ pub const PF_NETBIOS: u32 = 33; pub const PF_PPP: u32 = 34; pub const PF_RESERVED_36: u32 = 36; pub const PF_UTUN: u32 = 38; -pub const PF_MAX: u32 = 40; -pub const NET_MAXID: u32 = 40; +pub const PF_VSOCK: u32 = 40; +pub const PF_MAX: u32 = 41; +pub const NET_MAXID: u32 = 41; pub const NET_RT_DUMP: u32 = 1; pub const NET_RT_FLAGS: u32 = 2; pub const NET_RT_IFLIST: u32 = 3; @@ -1193,6 +1259,7 @@ pub const MSG_SEND: u32 = 4096; pub const MSG_HAVEMORE: u32 = 8192; pub const MSG_RCVMORE: u32 = 16384; pub const MSG_NEEDSA: u32 = 65536; +pub const MSG_NOSIGNAL: u32 = 524288; pub const SCM_RIGHTS: u32 = 1; pub const SCM_TIMESTAMP: u32 = 2; pub const SCM_CREDS: u32 = 3; @@ -1357,6 +1424,7 @@ pub const IP_BOUND_IF: u32 = 25; pub const IP_PKTINFO: u32 = 26; pub const IP_RECVPKTINFO: u32 = 26; pub const IP_RECVTOS: u32 = 27; +pub const IP_DONTFRAG: u32 = 28; pub const IP_FW_ADD: u32 = 40; pub const IP_FW_DEL: u32 = 41; pub const IP_FW_FLUSH: u32 = 42; @@ -1430,6 +1498,9 @@ pub const __IPV6_ADDR_SCOPE_LINKLOCAL: u32 = 2; pub const __IPV6_ADDR_SCOPE_SITELOCAL: u32 = 5; pub const __IPV6_ADDR_SCOPE_ORGLOCAL: u32 = 8; pub const __IPV6_ADDR_SCOPE_GLOBAL: u32 = 14; +pub const IPV6_ADDR_MC_FLAGS_TRANSIENT: u32 = 16; +pub const IPV6_ADDR_MC_FLAGS_PREFIX: u32 = 32; +pub const IPV6_ADDR_MC_FLAGS_UNICAST_BASED: u32 = 48; pub const IPV6_SOCKOPT_RESERVED1: u32 = 3; pub const IPV6_UNICAST_HOPS: u32 = 4; pub const IPV6_MULTICAST_IF: u32 = 9; @@ -1700,6 +1771,13 @@ pub const O_NOFOLLOW: u32 = 256; pub const O_CREAT: u32 = 512; pub const O_TRUNC: u32 = 1024; pub const O_EXCL: u32 = 2048; +pub const O_EVTONLY: u32 = 32768; +pub const O_NOCTTY: u32 = 131072; +pub const O_DIRECTORY: u32 = 1048576; +pub const O_SYMLINK: u32 = 2097152; +pub const O_DSYNC: u32 = 4194304; +pub const O_CLOEXEC: u32 = 16777216; +pub const O_NOFOLLOW_ANY: u32 = 536870912; pub const AT_FDCWD: i32 = -2; pub const AT_EACCESS: u32 = 16; pub const AT_SYMLINK_NOFOLLOW: u32 = 32; @@ -1707,12 +1785,6 @@ pub const AT_SYMLINK_FOLLOW: u32 = 64; pub const AT_REMOVEDIR: u32 = 128; pub const AT_REALDEV: u32 = 512; pub const AT_FDONLY: u32 = 1024; -pub const O_EVTONLY: u32 = 32768; -pub const O_NOCTTY: u32 = 131072; -pub const O_DIRECTORY: u32 = 1048576; -pub const O_SYMLINK: u32 = 2097152; -pub const O_DSYNC: u32 = 4194304; -pub const O_CLOEXEC: u32 = 16777216; pub const O_DP_GETRAWENCRYPTED: u32 = 1; pub const O_DP_GETRAWUNENCRYPTED: u32 = 2; pub const FAPPEND: u32 = 8; @@ -1774,6 +1846,9 @@ pub const F_PUNCHHOLE: u32 = 99; pub const F_TRIM_ACTIVE_FILE: u32 = 100; pub const F_SPECULATIVE_READ: u32 = 101; pub const F_GETPATH_NOFIRMLINK: u32 = 102; +pub const F_ADDFILESIGS_INFO: u32 = 103; +pub const F_ADDFILESUPPL: u32 = 104; +pub const F_GETSIGSINFO: u32 = 105; pub const FCNTL_FS_SPECIFIC_BASE: u32 = 65536; pub const F_DUPFD_CLOEXEC: u32 = 67; pub const FD_CLOEXEC: u32 = 1; @@ -1814,6 +1889,8 @@ pub const F_ALLOCATECONTIG: u32 = 2; pub const F_ALLOCATEALL: u32 = 4; pub const F_PEOFPOSMODE: u32 = 3; pub const F_VOLPOSMODE: u32 = 4; +pub const USER_FSIGNATURES_CDHASH_LEN: u32 = 20; +pub const GETSIGSINFO_PLATFORM_BINARY: u32 = 1; pub const LOCK_SH: u32 = 1; pub const LOCK_EX: u32 = 2; pub const LOCK_NB: u32 = 4; @@ -2205,7 +2282,7 @@ pub const SIZE_T_MAX: i32 = -1; pub const UQUAD_MAX: i32 = -1; pub const QUAD_MAX: u64 = 9223372036854775807; pub const QUAD_MIN: i64 = -9223372036854775808; -pub const ARG_MAX: u32 = 262144; +pub const ARG_MAX: u32 = 1048576; pub const CHILD_MAX: u32 = 266; pub const GID_MAX: u32 = 2147483647; pub const LINK_MAX: u32 = 32767; @@ -2497,6 +2574,7 @@ pub const LOCAL_PEERPID: u32 = 2; pub const LOCAL_PEEREPID: u32 = 3; pub const LOCAL_PEERUUID: u32 = 4; pub const LOCAL_PEEREUUID: u32 = 5; +pub const LOCAL_PEERTOKEN: u32 = 6; pub const SM_DATABASE: u32 = 64; pub const SM_USER: u32 = 32; pub const SM_DATABASE_USER: u32 = 97; @@ -2618,35 +2696,21 @@ pub const SK_SEARCHARRAY: u32 = 32; pub const SK_SEARCHNULL: u32 = 64; pub const SK_SEARCHNOTNULL: u32 = 128; pub const SK_ORDER_BY: u32 = 256; -pub const EOH_HEADER_MAGIC: i32 = -1; -pub const EA_MAGIC: u32 = 689375833; -pub const MAX_KILOBYTES: u32 = 2147483647; -pub const PG_AUTOCONF_FILENAME: &'static [u8; 21usize] = b"postgresql.auto.conf\0"; -pub const GUC_QUALIFIER_SEPARATOR: u8 = 46u8; -pub const GUC_LIST_INPUT: u32 = 1; -pub const GUC_LIST_QUOTE: u32 = 2; -pub const GUC_NO_SHOW_ALL: u32 = 4; -pub const GUC_NO_RESET_ALL: u32 = 8; -pub const GUC_REPORT: u32 = 16; -pub const GUC_NOT_IN_SAMPLE: u32 = 32; -pub const GUC_DISALLOW_IN_FILE: u32 = 64; -pub const GUC_CUSTOM_PLACEHOLDER: u32 = 128; -pub const GUC_SUPERUSER_ONLY: u32 = 256; -pub const GUC_IS_NAME: u32 = 512; -pub const GUC_NOT_WHILE_SEC_REST: u32 = 1024; -pub const GUC_DISALLOW_IN_AUTO_FILE: u32 = 2048; -pub const GUC_UNIT_KB: u32 = 4096; -pub const GUC_UNIT_BLOCKS: u32 = 8192; -pub const GUC_UNIT_XBLOCKS: u32 = 12288; -pub const GUC_UNIT_MB: u32 = 16384; -pub const GUC_UNIT_BYTE: u32 = 32768; -pub const GUC_UNIT_MEMORY: u32 = 61440; -pub const GUC_UNIT_MS: u32 = 65536; -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_UNIT: u32 = 1044480; +pub const GIN_COMPARE_PROC: u32 = 1; +pub const GIN_EXTRACTVALUE_PROC: u32 = 2; +pub const GIN_EXTRACTQUERY_PROC: u32 = 3; +pub const GIN_CONSISTENT_PROC: u32 = 4; +pub const GIN_COMPARE_PARTIAL_PROC: u32 = 5; +pub const GIN_TRICONSISTENT_PROC: u32 = 6; +pub const GIN_OPTIONS_PROC: u32 = 7; +pub const GINNProcs: u32 = 7; +pub const GIN_SEARCH_MODE_DEFAULT: u32 = 0; +pub const GIN_SEARCH_MODE_INCLUDE_EMPTY: u32 = 1; +pub const GIN_SEARCH_MODE_ALL: u32 = 2; +pub const GIN_SEARCH_MODE_EVERYTHING: u32 = 3; +pub const GIN_FALSE: u32 = 0; +pub const GIN_TRUE: u32 = 1; +pub const GIN_MAYBE: u32 = 2; pub const XLR_NORMAL_MAX_BLOCK_ID: u32 = 4; pub const XLR_NORMAL_RDATAS: u32 = 20; pub const REGBUF_FORCE_IMAGE: u32 = 1; @@ -2678,6 +2742,52 @@ pub const TABLESPACE_MAP: &'static [u8; 15usize] = b"tablespace_map\0"; pub const TABLESPACE_MAP_OLD: &'static [u8; 19usize] = b"tablespace_map.old\0"; pub const PROMOTE_SIGNAL_FILE: &'static [u8; 8usize] = b"promote\0"; pub const FALLBACK_PROMOTE_SIGNAL_FILE: &'static [u8; 17usize] = b"fallback_promote\0"; +pub const GIST_CONSISTENT_PROC: u32 = 1; +pub const GIST_UNION_PROC: u32 = 2; +pub const GIST_COMPRESS_PROC: u32 = 3; +pub const GIST_DECOMPRESS_PROC: u32 = 4; +pub const GIST_PENALTY_PROC: u32 = 5; +pub const GIST_PICKSPLIT_PROC: u32 = 6; +pub const GIST_EQUAL_PROC: u32 = 7; +pub const GIST_DISTANCE_PROC: u32 = 8; +pub const GIST_FETCH_PROC: u32 = 9; +pub const GIST_OPTIONS_PROC: u32 = 10; +pub const GISTNProcs: u32 = 10; +pub const F_LEAF: u32 = 1; +pub const F_DELETED: u32 = 2; +pub const F_TUPLES_DELETED: u32 = 4; +pub const F_FOLLOW_RIGHT: u32 = 8; +pub const F_HAS_GARBAGE: u32 = 16; +pub const GIST_PAGE_ID: u32 = 65409; +pub const EOH_HEADER_MAGIC: i32 = -1; +pub const EA_MAGIC: u32 = 689375833; +pub const MAX_KILOBYTES: u32 = 2147483647; +pub const PG_AUTOCONF_FILENAME: &'static [u8; 21usize] = b"postgresql.auto.conf\0"; +pub const GUC_QUALIFIER_SEPARATOR: u8 = 46u8; +pub const GUC_LIST_INPUT: u32 = 1; +pub const GUC_LIST_QUOTE: u32 = 2; +pub const GUC_NO_SHOW_ALL: u32 = 4; +pub const GUC_NO_RESET_ALL: u32 = 8; +pub const GUC_REPORT: u32 = 16; +pub const GUC_NOT_IN_SAMPLE: u32 = 32; +pub const GUC_DISALLOW_IN_FILE: u32 = 64; +pub const GUC_CUSTOM_PLACEHOLDER: u32 = 128; +pub const GUC_SUPERUSER_ONLY: u32 = 256; +pub const GUC_IS_NAME: u32 = 512; +pub const GUC_NOT_WHILE_SEC_REST: u32 = 1024; +pub const GUC_DISALLOW_IN_AUTO_FILE: u32 = 2048; +pub const GUC_UNIT_KB: u32 = 4096; +pub const GUC_UNIT_BLOCKS: u32 = 8192; +pub const GUC_UNIT_XBLOCKS: u32 = 12288; +pub const GUC_UNIT_MB: u32 = 16384; +pub const GUC_UNIT_BYTE: u32 = 32768; +pub const GUC_UNIT_MEMORY: u32 = 61440; +pub const GUC_UNIT_MS: u32 = 65536; +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_UNIT: u32 = 1044480; pub const RelationRelationId: u32 = 1259; pub const RelationRelation_Rowtype_Id: u32 = 83; pub const Anum_pg_class_oid: u32 = 1; @@ -4721,6 +4831,182 @@ pub struct __darwin_x86_debug_state32 { pub __dr7: ::std::os::raw::c_uint, } #[repr(C)] +#[derive(Copy, Clone)] +pub struct __x86_instruction_state { + pub __insn_stream_valid_bytes: ::std::os::raw::c_int, + pub __insn_offset: ::std::os::raw::c_int, + pub __out_of_synch: ::std::os::raw::c_int, + pub __insn_bytes: [__uint8_t; 2380usize], + pub __insn_cacheline: [__uint8_t; 64usize], +} +impl Default for __x86_instruction_state { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __last_branch_record { + pub __from_ip: __uint64_t, + pub __to_ip: __uint64_t, + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_padding_0: u32, +} +impl __last_branch_record { + #[inline] + pub fn __mispredict(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___mispredict(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn __tsx_abort(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___tsx_abort(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn __in_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set___in_tsx(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn __cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 16u8) as u32) } + } + #[inline] + pub fn set___cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 16u8, val as u64) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 13u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + __mispredict: __uint32_t, + __tsx_abort: __uint32_t, + __in_tsx: __uint32_t, + __cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __mispredict: u32 = unsafe { ::std::mem::transmute(__mispredict) }; + __mispredict as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __tsx_abort: u32 = unsafe { ::std::mem::transmute(__tsx_abort) }; + __tsx_abort as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let __in_tsx: u32 = unsafe { ::std::mem::transmute(__in_tsx) }; + __in_tsx as u64 + }); + __bindgen_bitfield_unit.set(3usize, 16u8, { + let __cycle_count: u32 = unsafe { ::std::mem::transmute(__cycle_count) }; + __cycle_count as u64 + }); + __bindgen_bitfield_unit.set(19usize, 13u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __last_branch_state { + pub __lbr_count: ::std::os::raw::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __lbrs: [__last_branch_record; 32usize], +} +impl __last_branch_state { + #[inline] + pub fn __lbr_supported_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_tsx(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn __lbr_supported_cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + __lbr_supported_tsx: __uint32_t, + __lbr_supported_cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __lbr_supported_tsx: u32 = unsafe { ::std::mem::transmute(__lbr_supported_tsx) }; + __lbr_supported_tsx as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __lbr_supported_cycle_count: u32 = + unsafe { ::std::mem::transmute(__lbr_supported_cycle_count) }; + __lbr_supported_cycle_count as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct __x86_pagein_state { pub __pagein_error: ::std::os::raw::c_int, @@ -5451,7 +5737,48 @@ pub struct rusage_info_v4 { pub ri_interval_max_phys_footprint: u64, pub ri_runnable_time: u64, } -pub type rusage_info_current = rusage_info_v4; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct rusage_info_v5 { + pub ri_uuid: [u8; 16usize], + pub ri_user_time: u64, + pub ri_system_time: u64, + pub ri_pkg_idle_wkups: u64, + pub ri_interrupt_wkups: u64, + pub ri_pageins: u64, + pub ri_wired_size: u64, + pub ri_resident_size: u64, + pub ri_phys_footprint: u64, + pub ri_proc_start_abstime: u64, + pub ri_proc_exit_abstime: u64, + pub ri_child_user_time: u64, + pub ri_child_system_time: u64, + pub ri_child_pkg_idle_wkups: u64, + pub ri_child_interrupt_wkups: u64, + pub ri_child_pageins: u64, + pub ri_child_elapsed_abstime: u64, + pub ri_diskio_bytesread: u64, + pub ri_diskio_byteswritten: u64, + pub ri_cpu_time_qos_default: u64, + pub ri_cpu_time_qos_maintenance: u64, + pub ri_cpu_time_qos_background: u64, + pub ri_cpu_time_qos_utility: u64, + pub ri_cpu_time_qos_legacy: u64, + pub ri_cpu_time_qos_user_initiated: u64, + pub ri_cpu_time_qos_user_interactive: u64, + pub ri_billed_system_time: u64, + pub ri_serviced_system_time: u64, + pub ri_logical_writes: u64, + pub ri_lifetime_max_phys_footprint: u64, + pub ri_instructions: u64, + pub ri_cycles: u64, + pub ri_billed_energy: u64, + pub ri_serviced_energy: u64, + pub ri_interval_max_phys_footprint: u64, + pub ri_runnable_time: u64, + pub ri_flags: u64, +} +pub type rusage_info_current = rusage_info_v5; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct rlimit { @@ -6396,6 +6723,15 @@ extern "C" { ) -> *mut ::std::os::raw::c_void; } #[pg_guard] +extern "C" { + pub fn strtonum( + __numstr: *const ::std::os::raw::c_char, + __minval: ::std::os::raw::c_longlong, + __maxval: ::std::os::raw::c_longlong, + __errstrp: *mut *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_longlong; +} +#[pg_guard] extern "C" { pub fn strtoq( __str: *const ::std::os::raw::c_char, @@ -6734,6 +7070,14 @@ extern "C" { ) -> ::std::os::raw::c_int; } #[pg_guard] +extern "C" { + pub fn strsignal_r( + __sig: ::std::os::raw::c_int, + __strsignalbuf: *mut ::std::os::raw::c_char, + __buflen: usize, + ) -> ::std::os::raw::c_int; +} +#[pg_guard] extern "C" { pub fn bcmp( arg1: *const ::std::os::raw::c_void, @@ -11374,27 +11718,13 @@ pub struct radvisory { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct fcodeblobs { - pub f_cd_hash: *mut ::std::os::raw::c_void, - pub f_hash_size: usize, - pub f_cd_buffer: *mut ::std::os::raw::c_void, - pub f_cd_size: usize, - pub f_out_size: *mut ::std::os::raw::c_uint, - pub f_arch: ::std::os::raw::c_int, - pub __padding: ::std::os::raw::c_int, -} -impl Default for fcodeblobs { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub type fcodeblobs_t = fcodeblobs; -#[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct fsignatures { pub fs_file_start: off_t, pub fs_blob_start: *mut ::std::os::raw::c_void, pub fs_blob_size: usize, + pub fs_fsignatures_size: usize, + pub fs_cdhash: [::std::os::raw::c_char; 20usize], + pub fs_hash_type: ::std::os::raw::c_int, } impl Default for fsignatures { fn default() -> Self { @@ -11403,6 +11733,15 @@ impl Default for fsignatures { } pub type fsignatures_t = fsignatures; #[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct fsupplement { + pub fs_file_start: off_t, + pub fs_blob_start: off_t, + pub fs_blob_size: usize, + pub fs_orig_fd: ::std::os::raw::c_int, +} +pub type fsupplement_t = fsupplement; +#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct fchecklv { pub lv_file_start: off_t, @@ -11417,6 +11756,14 @@ impl Default for fchecklv { pub type fchecklv_t = fchecklv; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] +pub struct fgetsigsinfo { + pub fg_file_start: off_t, + pub fg_info_request: ::std::os::raw::c_int, + pub fg_sig_is_platform: ::std::os::raw::c_int, +} +pub type fgetsigsinfo_t = fgetsigsinfo; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] pub struct fstore { pub fst_flags: ::std::os::raw::c_uint, pub fst_posmode: ::std::os::raw::c_int, @@ -27606,1982 +27953,2067 @@ extern "C" { extern "C" { pub fn GetIndexAmRoutineByAmId(amoid: Oid, noerror: bool) -> *mut IndexAmRoutine; } +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct GinStatsData { + pub nPendingPages: BlockNumber, + pub nTotalPages: BlockNumber, + pub nEntryPages: BlockNumber, + pub nDataPages: BlockNumber, + pub nEntries: int64, + pub ginVersion: int32, +} +pub type GinTernaryValue = ::std::os::raw::c_char; #[pg_guard] extern "C" { - pub fn relation_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; + pub static mut GinFuzzySearchLimit: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn try_relation_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; + pub static mut gin_pending_list_limit: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn relation_openrv(relation: *const RangeVar, lockmode: LOCKMODE) -> Relation; + pub fn ginGetStats(index: Relation, stats: *mut GinStatsData); } #[pg_guard] extern "C" { - pub fn relation_openrv_extended( - relation: *const RangeVar, - lockmode: LOCKMODE, - missing_ok: bool, - ) -> Relation; + pub fn ginUpdateStats(index: Relation, stats: *const GinStatsData, is_build: bool); } #[pg_guard] extern "C" { - pub fn relation_close(relation: Relation, lockmode: LOCKMODE); + pub fn XLogBeginInsert(); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct TableScanDescData { - pub rs_rd: Relation, - pub rs_snapshot: *mut SnapshotData, - pub rs_nkeys: ::std::os::raw::c_int, - pub rs_key: *mut ScanKeyData, - pub rs_flags: uint32, - pub rs_parallel: *mut ParallelTableScanDescData, +#[pg_guard] +extern "C" { + pub fn XLogSetRecordFlags(flags: uint8); } -impl Default for TableScanDescData { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn XLogInsert(rmid: RmgrId, info: uint8) -> XLogRecPtr; } -pub type TableScanDesc = *mut TableScanDescData; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct ParallelTableScanDescData { - pub phs_relid: Oid, - pub phs_syncscan: bool, - pub phs_snapshot_any: bool, - pub phs_snapshot_off: Size, +#[pg_guard] +extern "C" { + pub fn XLogEnsureRecordSpace( + max_block_id: ::std::os::raw::c_int, + ndatas: ::std::os::raw::c_int, + ); } -pub type ParallelTableScanDesc = *mut ParallelTableScanDescData; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct ParallelBlockTableScanDescData { - pub base: ParallelTableScanDescData, - pub phs_nblocks: BlockNumber, - pub phs_mutex: slock_t, - pub phs_startblock: BlockNumber, - pub phs_nallocated: pg_atomic_uint64, +#[pg_guard] +extern "C" { + pub fn XLogRegisterData(data: *mut ::std::os::raw::c_char, len: ::std::os::raw::c_int); } -pub type ParallelBlockTableScanDesc = *mut ParallelBlockTableScanDescData; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct IndexFetchTableData { - pub rel: Relation, +#[pg_guard] +extern "C" { + pub fn XLogRegisterBuffer(block_id: uint8, buffer: Buffer, flags: uint8); } -impl Default for IndexFetchTableData { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn XLogRegisterBlock( + block_id: uint8, + rnode: *mut RelFileNode, + forknum: ForkNumber, + blknum: BlockNumber, + page: *mut ::std::os::raw::c_char, + flags: uint8, + ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct IndexScanDescData { - pub heapRelation: Relation, - pub indexRelation: Relation, - pub xs_snapshot: *mut SnapshotData, - pub numberOfKeys: ::std::os::raw::c_int, - pub numberOfOrderBys: ::std::os::raw::c_int, - pub keyData: *mut ScanKeyData, - pub orderByData: *mut ScanKeyData, - pub xs_want_itup: bool, - pub xs_temp_snap: bool, - pub kill_prior_tuple: bool, - pub ignore_killed_tuples: bool, - pub xactStartedInRecovery: bool, - pub opaque: *mut ::std::os::raw::c_void, - pub xs_itup: IndexTuple, - pub xs_itupdesc: *mut TupleDescData, - pub xs_hitup: HeapTuple, - pub xs_hitupdesc: *mut TupleDescData, - pub xs_heaptid: ItemPointerData, - pub xs_heap_continue: bool, - pub xs_heapfetch: *mut IndexFetchTableData, - pub xs_recheck: bool, - pub xs_orderbyvals: *mut Datum, - pub xs_orderbynulls: *mut bool, - pub xs_recheckorderby: bool, - pub parallel_scan: *mut ParallelIndexScanDescData, +#[pg_guard] +extern "C" { + pub fn XLogRegisterBufData( + block_id: uint8, + data: *mut ::std::os::raw::c_char, + len: ::std::os::raw::c_int, + ); } -impl Default for IndexScanDescData { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn XLogResetInsertion(); } -#[repr(C)] -#[derive(Debug, Default)] -pub struct ParallelIndexScanDescData { - pub ps_relid: Oid, - pub ps_indexid: Oid, - pub ps_offset: Size, - pub ps_snapshot_data: __IncompleteArrayField<::std::os::raw::c_char>, +#[pg_guard] +extern "C" { + pub fn XLogCheckBufferNeedsBackup(buffer: Buffer) -> bool; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SysScanDescData { - pub heap_rel: Relation, - pub irel: Relation, - pub scan: *mut TableScanDescData, - pub iscan: *mut IndexScanDescData, - pub snapshot: *mut SnapshotData, - pub slot: *mut TupleTableSlot, +#[pg_guard] +extern "C" { + pub fn log_newpage( + rnode: *mut RelFileNode, + forkNum: ForkNumber, + blk: BlockNumber, + page: *mut ::std::os::raw::c_char, + page_std: bool, + ) -> XLogRecPtr; } -impl Default for SysScanDescData { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn log_newpage_buffer(buffer: Buffer, page_std: bool) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn table_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; + pub fn log_newpage_range( + rel: Relation, + forkNum: ForkNumber, + startblk: BlockNumber, + endblk: BlockNumber, + page_std: bool, + ); } #[pg_guard] extern "C" { - pub fn table_openrv(relation: *const RangeVar, lockmode: LOCKMODE) -> Relation; + pub fn XLogSaveBufferForHint(buffer: Buffer, buffer_std: bool) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn table_openrv_extended( - relation: *const RangeVar, - lockmode: LOCKMODE, - missing_ok: bool, - ) -> Relation; + pub fn InitXLogInsert(); } #[pg_guard] extern "C" { - pub fn table_close(relation: Relation, lockmode: LOCKMODE); + pub static mut sync_method: ::std::os::raw::c_int; } -pub type EOM_get_flat_size_method = - ::std::option::Option Size>; -pub type EOM_flatten_into_method = ::std::option::Option< - unsafe extern "C" fn( - eohptr: *mut ExpandedObjectHeader, - result: *mut ::std::os::raw::c_void, - allocated_size: Size, - ), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct ExpandedObjectMethods { - pub get_flat_size: EOM_get_flat_size_method, - pub flatten_into: EOM_flatten_into_method, +#[pg_guard] +extern "C" { + pub static mut ThisTimeLineID: TimeLineID; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ExpandedObjectHeader { - pub vl_len_: int32, - pub eoh_methods: *const ExpandedObjectMethods, - pub eoh_context: MemoryContext, - pub eoh_rw_ptr: [::std::os::raw::c_char; 10usize], - pub eoh_ro_ptr: [::std::os::raw::c_char; 10usize], +#[pg_guard] +extern "C" { + pub static mut InRecovery: bool; } -impl Default for ExpandedObjectHeader { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +pub const HotStandbyState_STANDBY_DISABLED: HotStandbyState = 0; +pub const HotStandbyState_STANDBY_INITIALIZED: HotStandbyState = 1; +pub const HotStandbyState_STANDBY_SNAPSHOT_PENDING: HotStandbyState = 2; +pub const HotStandbyState_STANDBY_SNAPSHOT_READY: HotStandbyState = 3; +pub type HotStandbyState = ::std::os::raw::c_uint; +#[pg_guard] +extern "C" { + pub static mut standbyState: HotStandbyState; } +pub const RecoveryTargetType_RECOVERY_TARGET_UNSET: RecoveryTargetType = 0; +pub const RecoveryTargetType_RECOVERY_TARGET_XID: RecoveryTargetType = 1; +pub const RecoveryTargetType_RECOVERY_TARGET_TIME: RecoveryTargetType = 2; +pub const RecoveryTargetType_RECOVERY_TARGET_NAME: RecoveryTargetType = 3; +pub const RecoveryTargetType_RECOVERY_TARGET_LSN: RecoveryTargetType = 4; +pub const RecoveryTargetType_RECOVERY_TARGET_IMMEDIATE: RecoveryTargetType = 5; +pub type RecoveryTargetType = ::std::os::raw::c_uint; +pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_CONTROLFILE: + RecoveryTargetTimeLineGoal = 0; +pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_LATEST: RecoveryTargetTimeLineGoal = + 1; +pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_NUMERIC: RecoveryTargetTimeLineGoal = + 2; +pub type RecoveryTargetTimeLineGoal = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn DatumGetEOHP(d: Datum) -> *mut ExpandedObjectHeader; + pub static mut ProcLastRecPtr: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn EOH_init_header( - eohptr: *mut ExpandedObjectHeader, - methods: *const ExpandedObjectMethods, - obj_context: MemoryContext, - ); + pub static mut XactLastRecEnd: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn EOH_get_flat_size(eohptr: *mut ExpandedObjectHeader) -> Size; + pub static mut XactLastCommitEnd: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn EOH_flatten_into( - eohptr: *mut ExpandedObjectHeader, - result: *mut ::std::os::raw::c_void, - allocated_size: Size, - ); + pub static mut reachedConsistency: bool; } #[pg_guard] extern "C" { - pub fn MakeExpandedObjectReadOnlyInternal(d: Datum) -> Datum; + pub static mut wal_segment_size: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn TransferExpandedObject(d: Datum, new_parent: MemoryContext) -> Datum; + pub static mut min_wal_size_mb: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn DeleteExpandedObject(d: Datum); + pub static mut max_wal_size_mb: ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct ArrayType { - pub vl_len_: int32, - pub ndim: ::std::os::raw::c_int, - pub dataoffset: int32, - pub elemtype: Oid, +#[pg_guard] +extern "C" { + pub static mut wal_keep_size_mb: ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ExpandedArrayHeader { - pub hdr: ExpandedObjectHeader, - pub ea_magic: ::std::os::raw::c_int, - pub ndims: ::std::os::raw::c_int, - pub dims: *mut ::std::os::raw::c_int, - pub lbound: *mut ::std::os::raw::c_int, - pub element_type: Oid, - pub typlen: int16, - pub typbyval: bool, - pub typalign: ::std::os::raw::c_char, - pub dvalues: *mut Datum, - pub dnulls: *mut bool, - pub dvalueslen: ::std::os::raw::c_int, - pub nelems: ::std::os::raw::c_int, - pub flat_size: Size, - pub fvalue: *mut ArrayType, - pub fstartptr: *mut ::std::os::raw::c_char, - pub fendptr: *mut ::std::os::raw::c_char, -} -impl Default for ExpandedArrayHeader { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union AnyArrayType { - pub flt: ArrayType, - pub xpn: ExpandedArrayHeader, - _bindgen_union_align: [u64; 17usize], -} -impl Default for AnyArrayType { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayBuildState { - pub mcontext: MemoryContext, - pub dvalues: *mut Datum, - pub dnulls: *mut bool, - pub alen: ::std::os::raw::c_int, - pub nelems: ::std::os::raw::c_int, - pub element_type: Oid, - pub typlen: int16, - pub typbyval: bool, - pub typalign: ::std::os::raw::c_char, - pub private_cxt: bool, -} -impl Default for ArrayBuildState { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayBuildStateArr { - pub mcontext: MemoryContext, - pub data: *mut ::std::os::raw::c_char, - pub nullbitmap: *mut bits8, - pub abytes: ::std::os::raw::c_int, - pub nbytes: ::std::os::raw::c_int, - pub aitems: ::std::os::raw::c_int, - pub nitems: ::std::os::raw::c_int, - pub ndims: ::std::os::raw::c_int, - pub dims: [::std::os::raw::c_int; 6usize], - pub lbs: [::std::os::raw::c_int; 6usize], - pub array_type: Oid, - pub element_type: Oid, - pub private_cxt: bool, -} -impl Default for ArrayBuildStateArr { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayBuildStateAny { - pub scalarstate: *mut ArrayBuildState, - pub arraystate: *mut ArrayBuildStateArr, -} -impl Default for ArrayBuildStateAny { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub static mut max_slot_wal_keep_size_mb: ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayMetaState { - pub element_type: Oid, - pub typlen: int16, - pub typbyval: bool, - pub typalign: ::std::os::raw::c_char, - pub typdelim: ::std::os::raw::c_char, - pub typioparam: Oid, - pub typiofunc: Oid, - pub proc_: FmgrInfo, +#[pg_guard] +extern "C" { + pub static mut XLOGbuffers: ::std::os::raw::c_int; } -impl Default for ArrayMetaState { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub static mut XLogArchiveTimeout: ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayMapState { - pub inp_extra: ArrayMetaState, - pub ret_extra: ArrayMetaState, +#[pg_guard] +extern "C" { + pub static mut wal_retrieve_retry_interval: ::std::os::raw::c_int; } -impl Default for ArrayMapState { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub static mut XLogArchiveCommand: *mut ::std::os::raw::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ArrayIteratorData { - _unused: [u8; 0], +#[pg_guard] +extern "C" { + pub static mut EnableHotStandby: bool; } -pub type ArrayIterator = *mut ArrayIteratorData; #[pg_guard] extern "C" { - pub static mut Array_nulls: bool; + pub static mut fullPageWrites: bool; } #[pg_guard] extern "C" { - pub fn CopyArrayEls( - array: *mut ArrayType, - values: *mut Datum, - nulls: *mut bool, - nitems: ::std::os::raw::c_int, - typlen: ::std::os::raw::c_int, - typbyval: bool, - typalign: ::std::os::raw::c_char, - freedata: bool, - ); + pub static mut wal_log_hints: bool; } #[pg_guard] extern "C" { - pub fn array_get_element( - arraydatum: Datum, - nSubscripts: ::std::os::raw::c_int, - indx: *mut ::std::os::raw::c_int, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - isNull: *mut bool, - ) -> Datum; + pub static mut wal_compression: bool; } #[pg_guard] extern "C" { - pub fn array_set_element( - arraydatum: Datum, - nSubscripts: ::std::os::raw::c_int, - indx: *mut ::std::os::raw::c_int, - dataValue: Datum, - isNull: bool, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> Datum; + pub static mut wal_init_zero: bool; } #[pg_guard] extern "C" { - pub fn array_get_slice( - arraydatum: Datum, - nSubscripts: ::std::os::raw::c_int, - upperIndx: *mut ::std::os::raw::c_int, - lowerIndx: *mut ::std::os::raw::c_int, - upperProvided: *mut bool, - lowerProvided: *mut bool, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> Datum; + pub static mut wal_recycle: bool; } #[pg_guard] extern "C" { - pub fn array_set_slice( - arraydatum: Datum, - nSubscripts: ::std::os::raw::c_int, - upperIndx: *mut ::std::os::raw::c_int, - lowerIndx: *mut ::std::os::raw::c_int, - upperProvided: *mut bool, - lowerProvided: *mut bool, - srcArrayDatum: Datum, - isNull: bool, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> Datum; + pub static mut wal_consistency_checking: *mut bool; } #[pg_guard] extern "C" { - pub fn array_ref( - array: *mut ArrayType, - nSubscripts: ::std::os::raw::c_int, - indx: *mut ::std::os::raw::c_int, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - isNull: *mut bool, - ) -> Datum; + pub static mut wal_consistency_checking_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn array_set( - array: *mut ArrayType, - nSubscripts: ::std::os::raw::c_int, - indx: *mut ::std::os::raw::c_int, - dataValue: Datum, - isNull: bool, - arraytyplen: ::std::os::raw::c_int, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> *mut ArrayType; + pub static mut log_checkpoints: bool; } #[pg_guard] extern "C" { - pub fn array_map( - arrayd: Datum, - exprstate: *mut ExprState, - econtext: *mut ExprContext, - retType: Oid, - amstate: *mut ArrayMapState, - ) -> Datum; + pub static mut recoveryRestoreCommand: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn array_bitmap_copy( - destbitmap: *mut bits8, - destoffset: ::std::os::raw::c_int, - srcbitmap: *const bits8, - srcoffset: ::std::os::raw::c_int, - nitems: ::std::os::raw::c_int, - ); + pub static mut recoveryEndCommand: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn construct_array( - elems: *mut Datum, - nelems: ::std::os::raw::c_int, - elmtype: Oid, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> *mut ArrayType; + pub static mut archiveCleanupCommand: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn construct_md_array( - elems: *mut Datum, - nulls: *mut bool, - ndims: ::std::os::raw::c_int, - dims: *mut ::std::os::raw::c_int, - lbs: *mut ::std::os::raw::c_int, - elmtype: Oid, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - ) -> *mut ArrayType; + pub static mut recoveryTargetInclusive: bool; } #[pg_guard] extern "C" { - pub fn construct_empty_array(elmtype: Oid) -> *mut ArrayType; + pub static mut recoveryTargetAction: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn construct_empty_expanded_array( - element_type: Oid, - parentcontext: MemoryContext, - metacache: *mut ArrayMetaState, - ) -> *mut ExpandedArrayHeader; + pub static mut recovery_min_apply_delay: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn deconstruct_array( - array: *mut ArrayType, - elmtype: Oid, - elmlen: ::std::os::raw::c_int, - elmbyval: bool, - elmalign: ::std::os::raw::c_char, - elemsp: *mut *mut Datum, - nullsp: *mut *mut bool, - nelemsp: *mut ::std::os::raw::c_int, - ); + pub static mut PrimaryConnInfo: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn array_contains_nulls(array: *mut ArrayType) -> bool; + pub static mut PrimarySlotName: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn initArrayResult( - element_type: Oid, - rcontext: MemoryContext, - subcontext: bool, - ) -> *mut ArrayBuildState; + pub static mut wal_receiver_create_temp_slot: bool; } #[pg_guard] extern "C" { - pub fn accumArrayResult( - astate: *mut ArrayBuildState, - dvalue: Datum, - disnull: bool, - element_type: Oid, - rcontext: MemoryContext, - ) -> *mut ArrayBuildState; + pub static mut recoveryTargetXid: TransactionId; } #[pg_guard] extern "C" { - pub fn makeArrayResult(astate: *mut ArrayBuildState, rcontext: MemoryContext) -> Datum; + pub static mut recovery_target_time_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn makeMdArrayResult( - astate: *mut ArrayBuildState, - ndims: ::std::os::raw::c_int, - dims: *mut ::std::os::raw::c_int, - lbs: *mut ::std::os::raw::c_int, - rcontext: MemoryContext, - release: bool, - ) -> Datum; + pub static mut recoveryTargetName: *const ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn initArrayResultArr( - array_type: Oid, - element_type: Oid, - rcontext: MemoryContext, - subcontext: bool, - ) -> *mut ArrayBuildStateArr; + pub static mut recoveryTargetLSN: XLogRecPtr; } #[pg_guard] extern "C" { - pub fn accumArrayResultArr( - astate: *mut ArrayBuildStateArr, - dvalue: Datum, - disnull: bool, - array_type: Oid, - rcontext: MemoryContext, - ) -> *mut ArrayBuildStateArr; + pub static mut recoveryTarget: RecoveryTargetType; } #[pg_guard] extern "C" { - pub fn makeArrayResultArr( - astate: *mut ArrayBuildStateArr, - rcontext: MemoryContext, - release: bool, - ) -> Datum; + pub static mut PromoteTriggerFile: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn initArrayResultAny( - input_type: Oid, - rcontext: MemoryContext, - subcontext: bool, - ) -> *mut ArrayBuildStateAny; + pub static mut recoveryTargetTimeLineGoal: RecoveryTargetTimeLineGoal; } #[pg_guard] extern "C" { - pub fn accumArrayResultAny( - astate: *mut ArrayBuildStateAny, - dvalue: Datum, - disnull: bool, - input_type: Oid, - rcontext: MemoryContext, - ) -> *mut ArrayBuildStateAny; + pub static mut recoveryTargetTLIRequested: TimeLineID; } #[pg_guard] extern "C" { - pub fn makeArrayResultAny( - astate: *mut ArrayBuildStateAny, - rcontext: MemoryContext, - release: bool, - ) -> Datum; + pub static mut recoveryTargetTLI: TimeLineID; } #[pg_guard] extern "C" { - pub fn array_create_iterator( - arr: *mut ArrayType, - slice_ndim: ::std::os::raw::c_int, - mstate: *mut ArrayMetaState, - ) -> ArrayIterator; + pub static mut CheckPointSegments: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn array_iterate(iterator: ArrayIterator, value: *mut Datum, isnull: *mut bool) -> bool; + pub static mut StandbyModeRequested: bool; } #[pg_guard] extern "C" { - pub fn array_free_iterator(iterator: ArrayIterator); + pub static mut StandbyMode: bool; } +pub const ArchiveMode_ARCHIVE_MODE_OFF: ArchiveMode = 0; +pub const ArchiveMode_ARCHIVE_MODE_ON: ArchiveMode = 1; +pub const ArchiveMode_ARCHIVE_MODE_ALWAYS: ArchiveMode = 2; +pub type ArchiveMode = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn ArrayGetOffset( - n: ::std::os::raw::c_int, - dim: *const ::std::os::raw::c_int, - lb: *const ::std::os::raw::c_int, - indx: *const ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub static mut XLogArchiveMode: ::std::os::raw::c_int; } +pub const WalLevel_WAL_LEVEL_MINIMAL: WalLevel = 0; +pub const WalLevel_WAL_LEVEL_REPLICA: WalLevel = 1; +pub const WalLevel_WAL_LEVEL_LOGICAL: WalLevel = 2; +pub type WalLevel = ::std::os::raw::c_uint; +pub const RecoveryState_RECOVERY_STATE_CRASH: RecoveryState = 0; +pub const RecoveryState_RECOVERY_STATE_ARCHIVE: RecoveryState = 1; +pub const RecoveryState_RECOVERY_STATE_DONE: RecoveryState = 2; +pub type RecoveryState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn ArrayGetOffset0( - n: ::std::os::raw::c_int, - tup: *const ::std::os::raw::c_int, - scale: *const ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub static mut wal_level: ::std::os::raw::c_int; +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct CheckpointStatsData { + pub ckpt_start_t: TimestampTz, + pub ckpt_write_t: TimestampTz, + pub ckpt_sync_t: TimestampTz, + pub ckpt_sync_end_t: TimestampTz, + pub ckpt_end_t: TimestampTz, + pub ckpt_bufs_written: ::std::os::raw::c_int, + pub ckpt_segs_added: ::std::os::raw::c_int, + pub ckpt_segs_removed: ::std::os::raw::c_int, + pub ckpt_segs_recycled: ::std::os::raw::c_int, + pub ckpt_sync_rels: ::std::os::raw::c_int, + pub ckpt_longest_sync: uint64, + pub ckpt_agg_sync_time: uint64, } #[pg_guard] extern "C" { - pub fn ArrayGetNItems( - ndim: ::std::os::raw::c_int, - dims: *const ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub static mut CheckpointStats: CheckpointStatsData; +} +pub const WALAvailability_WALAVAIL_INVALID_LSN: WALAvailability = 0; +pub const WALAvailability_WALAVAIL_RESERVED: WALAvailability = 1; +pub const WALAvailability_WALAVAIL_EXTENDED: WALAvailability = 2; +pub const WALAvailability_WALAVAIL_UNRESERVED: WALAvailability = 3; +pub const WALAvailability_WALAVAIL_REMOVED: WALAvailability = 4; +pub type WALAvailability = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct XLogRecData { + _unused: [u8; 0], } #[pg_guard] extern "C" { - pub fn mda_get_range( - n: ::std::os::raw::c_int, - span: *mut ::std::os::raw::c_int, - st: *const ::std::os::raw::c_int, - endp: *const ::std::os::raw::c_int, - ); + pub fn XLogInsertRecord( + rdata: *mut XLogRecData, + fpw_lsn: XLogRecPtr, + flags: uint8, + num_fpi: ::std::os::raw::c_int, + ) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn mda_get_prod( - n: ::std::os::raw::c_int, - range: *const ::std::os::raw::c_int, - prod: *mut ::std::os::raw::c_int, - ); + pub fn XLogFlush(RecPtr: XLogRecPtr); } #[pg_guard] extern "C" { - pub fn mda_get_offset_values( - n: ::std::os::raw::c_int, - dist: *mut ::std::os::raw::c_int, - prod: *const ::std::os::raw::c_int, - span: *const ::std::os::raw::c_int, - ); + pub fn XLogBackgroundFlush() -> bool; } #[pg_guard] extern "C" { - pub fn mda_next_tuple( - n: ::std::os::raw::c_int, - curr: *mut ::std::os::raw::c_int, - span: *const ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub fn XLogNeedsFlush(RecPtr: XLogRecPtr) -> bool; } #[pg_guard] extern "C" { - pub fn ArrayGetIntegerTypmods(arr: *mut ArrayType, n: *mut ::std::os::raw::c_int) - -> *mut int32; + pub fn XLogFileInit( + segno: XLogSegNo, + use_existent: *mut bool, + use_lock: bool, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn expand_array( - arraydatum: Datum, - parentcontext: MemoryContext, - metacache: *mut ArrayMetaState, - ) -> Datum; + pub fn XLogFileOpen(segno: XLogSegNo) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn DatumGetExpandedArray(d: Datum) -> *mut ExpandedArrayHeader; + pub fn CheckXLogRemoved(segno: XLogSegNo, tli: TimeLineID); } #[pg_guard] extern "C" { - pub fn DatumGetExpandedArrayX( - d: Datum, - metacache: *mut ArrayMetaState, - ) -> *mut ExpandedArrayHeader; + pub fn XLogGetLastRemovedSegno() -> XLogSegNo; } #[pg_guard] extern "C" { - pub fn DatumGetAnyArrayP(d: Datum) -> *mut AnyArrayType; + pub fn XLogSetAsyncXactLSN(record: XLogRecPtr); } #[pg_guard] extern "C" { - pub fn deconstruct_expanded_array(eah: *mut ExpandedArrayHeader); + pub fn XLogSetReplicationSlotMinimumLSN(lsn: XLogRecPtr); } -pub const GucContext_PGC_INTERNAL: GucContext = 0; -pub const GucContext_PGC_POSTMASTER: GucContext = 1; -pub const GucContext_PGC_SIGHUP: GucContext = 2; -pub const GucContext_PGC_SU_BACKEND: GucContext = 3; -pub const GucContext_PGC_BACKEND: GucContext = 4; -pub const GucContext_PGC_SUSET: GucContext = 5; -pub const GucContext_PGC_USERSET: GucContext = 6; -pub type GucContext = ::std::os::raw::c_uint; -pub const GucSource_PGC_S_DEFAULT: GucSource = 0; -pub const GucSource_PGC_S_DYNAMIC_DEFAULT: GucSource = 1; -pub const GucSource_PGC_S_ENV_VAR: GucSource = 2; -pub const GucSource_PGC_S_FILE: GucSource = 3; -pub const GucSource_PGC_S_ARGV: GucSource = 4; -pub const GucSource_PGC_S_GLOBAL: GucSource = 5; -pub const GucSource_PGC_S_DATABASE: GucSource = 6; -pub const GucSource_PGC_S_USER: GucSource = 7; -pub const GucSource_PGC_S_DATABASE_USER: GucSource = 8; -pub const GucSource_PGC_S_CLIENT: GucSource = 9; -pub const GucSource_PGC_S_OVERRIDE: GucSource = 10; -pub const GucSource_PGC_S_INTERACTIVE: GucSource = 11; -pub const GucSource_PGC_S_TEST: GucSource = 12; -pub const GucSource_PGC_S_SESSION: GucSource = 13; -pub type GucSource = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ConfigVariable { - pub name: *mut ::std::os::raw::c_char, - pub value: *mut ::std::os::raw::c_char, - pub errmsg: *mut ::std::os::raw::c_char, - pub filename: *mut ::std::os::raw::c_char, - pub sourceline: ::std::os::raw::c_int, - pub ignore: bool, - pub applied: bool, - pub next: *mut ConfigVariable, +#[pg_guard] +extern "C" { + pub fn xlog_redo(record: *mut XLogReaderState); } -impl Default for ConfigVariable { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn xlog_desc(buf: StringInfo, record: *mut XLogReaderState); } #[pg_guard] extern "C" { - pub fn ParseConfigFile( - config_file: *const ::std::os::raw::c_char, - strict: bool, - calling_file: *const ::std::os::raw::c_char, - calling_lineno: ::std::os::raw::c_int, - depth: ::std::os::raw::c_int, - elevel: ::std::os::raw::c_int, - head_p: *mut *mut ConfigVariable, - tail_p: *mut *mut ConfigVariable, - ) -> bool; + pub fn xlog_identify(info: uint8) -> *const ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn ParseConfigFp( - fp: *mut FILE, - config_file: *const ::std::os::raw::c_char, - depth: ::std::os::raw::c_int, - elevel: ::std::os::raw::c_int, - head_p: *mut *mut ConfigVariable, - tail_p: *mut *mut ConfigVariable, - ) -> bool; + pub fn issue_xlog_fsync(fd: ::std::os::raw::c_int, segno: XLogSegNo); } #[pg_guard] extern "C" { - pub fn ParseConfigDirectory( - includedir: *const ::std::os::raw::c_char, - calling_file: *const ::std::os::raw::c_char, - calling_lineno: ::std::os::raw::c_int, - depth: ::std::os::raw::c_int, - elevel: ::std::os::raw::c_int, - head_p: *mut *mut ConfigVariable, - tail_p: *mut *mut ConfigVariable, - ) -> bool; + pub fn RecoveryInProgress() -> bool; } #[pg_guard] extern "C" { - pub fn FreeConfigVariables(list: *mut ConfigVariable); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct config_enum_entry { - pub name: *const ::std::os::raw::c_char, - pub val: ::std::os::raw::c_int, - pub hidden: bool, + pub fn GetRecoveryState() -> RecoveryState; } -impl Default for config_enum_entry { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } +#[pg_guard] +extern "C" { + pub fn HotStandbyActive() -> bool; } -pub type GucBoolCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut bool, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucIntCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut ::std::os::raw::c_int, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucRealCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut f64, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucStringCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut *mut ::std::os::raw::c_char, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucEnumCheckHook = ::std::option::Option< - unsafe extern "C" fn( - newval: *mut ::std::os::raw::c_int, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool, ->; -pub type GucBoolAssignHook = - ::std::option::Option; -pub type GucIntAssignHook = ::std::option::Option< - unsafe extern "C" fn(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void), ->; -pub type GucRealAssignHook = - ::std::option::Option; -pub type GucStringAssignHook = ::std::option::Option< - unsafe extern "C" fn(newval: *const ::std::os::raw::c_char, extra: *mut ::std::os::raw::c_void), ->; -pub type GucEnumAssignHook = ::std::option::Option< - unsafe extern "C" fn(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void), ->; -pub type GucShowHook = - ::std::option::Option *const ::std::os::raw::c_char>; -pub const GucAction_GUC_ACTION_SET: GucAction = 0; -pub const GucAction_GUC_ACTION_LOCAL: GucAction = 1; -pub const GucAction_GUC_ACTION_SAVE: GucAction = 2; -pub type GucAction = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut Debug_print_plan: bool; + pub fn HotStandbyActiveInReplay() -> bool; } #[pg_guard] extern "C" { - pub static mut Debug_print_parse: bool; + pub fn XLogInsertAllowed() -> bool; } #[pg_guard] extern "C" { - pub static mut Debug_print_rewritten: bool; + pub fn GetXLogReceiptTime(rtime: *mut TimestampTz, fromStream: *mut bool); } #[pg_guard] extern "C" { - pub static mut Debug_pretty_print: bool; + pub fn GetXLogReplayRecPtr(replayTLI: *mut TimeLineID) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut log_parser_stats: bool; + pub fn GetXLogInsertRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut log_planner_stats: bool; + pub fn GetXLogWriteRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut log_executor_stats: bool; + pub fn RecoveryIsPaused() -> bool; } #[pg_guard] extern "C" { - pub static mut log_statement_stats: bool; + pub fn SetRecoveryPause(recoveryPause: bool); } #[pg_guard] extern "C" { - pub static mut log_btree_build_stats: bool; + pub fn GetLatestXTime() -> TimestampTz; } #[pg_guard] extern "C" { - pub static mut check_function_bodies: bool; + pub fn GetCurrentChunkReplayStartTime() -> TimestampTz; } #[pg_guard] extern "C" { - pub static mut session_auth_is_superuser: bool; + pub fn UpdateControlFile(); } #[pg_guard] extern "C" { - pub static mut log_duration: bool; + pub fn GetSystemIdentifier() -> uint64; } #[pg_guard] extern "C" { - pub static mut log_parameter_max_length: ::std::os::raw::c_int; + pub fn GetMockAuthenticationNonce() -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub static mut log_parameter_max_length_on_error: ::std::os::raw::c_int; + pub fn DataChecksumsEnabled() -> bool; } #[pg_guard] extern "C" { - pub static mut log_min_error_statement: ::std::os::raw::c_int; + pub fn GetFakeLSNForUnloggedRel() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut log_min_messages: ::std::os::raw::c_int; + pub fn XLOGShmemSize() -> Size; } #[pg_guard] extern "C" { - pub static mut client_min_messages: ::std::os::raw::c_int; + pub fn XLOGShmemInit(); } #[pg_guard] extern "C" { - pub static mut log_min_duration_sample: ::std::os::raw::c_int; + pub fn BootStrapXLOG(); } #[pg_guard] extern "C" { - pub static mut log_min_duration_statement: ::std::os::raw::c_int; + pub fn LocalProcessControlFile(reset: bool); } #[pg_guard] extern "C" { - pub static mut log_temp_files: ::std::os::raw::c_int; + pub fn StartupXLOG(); } #[pg_guard] extern "C" { - pub static mut log_statement_sample_rate: f64; + pub fn ShutdownXLOG(code: ::std::os::raw::c_int, arg: Datum); } #[pg_guard] extern "C" { - pub static mut log_xact_sample_rate: f64; + pub fn InitXLOGAccess(); } #[pg_guard] extern "C" { - pub static mut backtrace_functions: *mut ::std::os::raw::c_char; + pub fn CreateCheckPoint(flags: ::std::os::raw::c_int); } #[pg_guard] extern "C" { - pub static mut backtrace_symbol_list: *mut ::std::os::raw::c_char; + pub fn CreateRestartPoint(flags: ::std::os::raw::c_int) -> bool; } #[pg_guard] extern "C" { - pub static mut temp_file_limit: ::std::os::raw::c_int; + pub fn GetWALAvailability(targetLSN: XLogRecPtr) -> WALAvailability; } #[pg_guard] extern "C" { - pub static mut num_temp_buffers: ::std::os::raw::c_int; + pub fn CalculateMaxmumSafeLSN() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut cluster_name: *mut ::std::os::raw::c_char; + pub fn XLogPutNextOid(nextOid: Oid); } #[pg_guard] extern "C" { - pub static mut ConfigFileName: *mut ::std::os::raw::c_char; + pub fn XLogRestorePoint(rpName: *const ::std::os::raw::c_char) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut HbaFileName: *mut ::std::os::raw::c_char; + pub fn UpdateFullPageWrites(); } #[pg_guard] extern "C" { - pub static mut IdentFileName: *mut ::std::os::raw::c_char; + pub fn GetFullPageWriteInfo(RedoRecPtr_p: *mut XLogRecPtr, doPageWrites_p: *mut bool); } #[pg_guard] extern "C" { - pub static mut external_pid_file: *mut ::std::os::raw::c_char; + pub fn GetRedoRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut application_name: *mut ::std::os::raw::c_char; + pub fn GetInsertRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut tcp_keepalives_idle: ::std::os::raw::c_int; + pub fn GetFlushRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut tcp_keepalives_interval: ::std::os::raw::c_int; + pub fn GetLastImportantRecPtr() -> XLogRecPtr; } #[pg_guard] extern "C" { - pub static mut tcp_keepalives_count: ::std::os::raw::c_int; + pub fn RemovePromoteSignalFiles(); } #[pg_guard] extern "C" { - pub static mut tcp_user_timeout: ::std::os::raw::c_int; + pub fn PromoteIsTriggered() -> bool; } #[pg_guard] extern "C" { - pub static mut trace_sort: bool; + pub fn CheckPromoteSignal() -> bool; } #[pg_guard] extern "C" { - pub fn SetConfigOption( - name: *const ::std::os::raw::c_char, - value: *const ::std::os::raw::c_char, - context: GucContext, - source: GucSource, - ); + pub fn WakeupRecovery(); } #[pg_guard] extern "C" { - pub fn DefineCustomBoolVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut bool, - bootValue: bool, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucBoolCheckHook, - assign_hook: GucBoolAssignHook, - show_hook: GucShowHook, - ); + pub fn SetWalWriterSleeping(sleeping: bool); } #[pg_guard] extern "C" { - pub fn DefineCustomIntVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut ::std::os::raw::c_int, - bootValue: ::std::os::raw::c_int, - minValue: ::std::os::raw::c_int, - maxValue: ::std::os::raw::c_int, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucIntCheckHook, - assign_hook: GucIntAssignHook, - show_hook: GucShowHook, - ); + pub fn StartupRequestWalReceiverRestart(); } #[pg_guard] extern "C" { - pub fn DefineCustomRealVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut f64, - bootValue: f64, - minValue: f64, - maxValue: f64, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucRealCheckHook, - assign_hook: GucRealAssignHook, - show_hook: GucShowHook, - ); + pub fn XLogRequestWalReceiverReply(); } #[pg_guard] extern "C" { - pub fn DefineCustomStringVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut *mut ::std::os::raw::c_char, - bootValue: *const ::std::os::raw::c_char, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucStringCheckHook, - assign_hook: GucStringAssignHook, - show_hook: GucShowHook, - ); + pub fn assign_max_wal_size(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void); } #[pg_guard] extern "C" { - pub fn DefineCustomEnumVariable( - name: *const ::std::os::raw::c_char, - short_desc: *const ::std::os::raw::c_char, - long_desc: *const ::std::os::raw::c_char, - valueAddr: *mut ::std::os::raw::c_int, - bootValue: ::std::os::raw::c_int, - options: *const config_enum_entry, - context: GucContext, - flags: ::std::os::raw::c_int, - check_hook: GucEnumCheckHook, - assign_hook: GucEnumAssignHook, - show_hook: GucShowHook, - ); + pub fn assign_checkpoint_completion_target(newval: f64, extra: *mut ::std::os::raw::c_void); } +pub const SessionBackupState_SESSION_BACKUP_NONE: SessionBackupState = 0; +pub const SessionBackupState_SESSION_BACKUP_EXCLUSIVE: SessionBackupState = 1; +pub const SessionBackupState_SESSION_BACKUP_NON_EXCLUSIVE: SessionBackupState = 2; +pub type SessionBackupState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn EmitWarningsOnPlaceholders(className: *const ::std::os::raw::c_char); + pub fn do_pg_start_backup( + backupidstr: *const ::std::os::raw::c_char, + fast: bool, + starttli_p: *mut TimeLineID, + labelfile: StringInfo, + tablespaces: *mut *mut List, + tblspcmapfile: StringInfo, + infotbssize: bool, + needtblspcmapfile: bool, + ) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn GetConfigOption( - name: *const ::std::os::raw::c_char, - missing_ok: bool, - restrict_privileged: bool, - ) -> *const ::std::os::raw::c_char; -} -#[pg_guard] -extern "C" { - pub fn GetConfigOptionResetString( - name: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char; + pub fn do_pg_stop_backup( + labelfile: *mut ::std::os::raw::c_char, + waitforarchive: bool, + stoptli_p: *mut TimeLineID, + ) -> XLogRecPtr; } #[pg_guard] extern "C" { - pub fn GetConfigOptionFlags( - name: *const ::std::os::raw::c_char, - missing_ok: bool, - ) -> ::std::os::raw::c_int; + pub fn do_pg_abort_backup(code: ::std::os::raw::c_int, arg: Datum); } #[pg_guard] extern "C" { - pub fn ProcessConfigFile(context: GucContext); + pub fn register_persistent_abort_backup_handler(); } #[pg_guard] extern "C" { - pub fn InitializeGUCOptions(); + pub fn get_backup_status() -> SessionBackupState; } -#[pg_guard] -extern "C" { - pub fn SelectConfigFiles( - userDoption: *const ::std::os::raw::c_char, - progname: *const ::std::os::raw::c_char, - ) -> bool; +pub type GistNSN = XLogRecPtr; +pub type PageGistNSN = PageXLogRecPtr; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct GISTPageOpaqueData { + pub nsn: PageGistNSN, + pub rightlink: BlockNumber, + pub flags: uint16, + pub gist_page_id: uint16, } -#[pg_guard] -extern "C" { - pub fn ResetAllOptions(); +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, + pub spl_ldatum: Datum, + pub spl_ldatum_exists: bool, + pub spl_right: *mut OffsetNumber, + pub spl_nright: ::std::os::raw::c_int, + pub spl_rdatum: Datum, + pub spl_rdatum_exists: bool, } -#[pg_guard] -extern "C" { - pub fn AtStart_GUC(); +impl Default for GIST_SPLITVEC { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn NewGUCNestLevel() -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GISTENTRY { + pub key: Datum, + pub rel: Relation, + pub page: Page, + pub offset: OffsetNumber, + pub leafkey: bool, } -#[pg_guard] -extern "C" { - pub fn AtEOXact_GUC(isCommit: bool, nestLevel: ::std::os::raw::c_int); +impl Default for GISTENTRY { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn BeginReportingGUCOptions(); +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct GISTDeletedPageContents { + pub deleteXid: FullTransactionId, } -#[pg_guard] -extern "C" { - pub fn ParseLongOption( - string: *const ::std::os::raw::c_char, - name: *mut *mut ::std::os::raw::c_char, - value: *mut *mut ::std::os::raw::c_char, - ); +#[repr(C)] +#[derive(Debug)] +pub struct GistEntryVector { + pub n: int32, + pub vector: __IncompleteArrayField, } -#[pg_guard] -extern "C" { - pub fn parse_int( - value: *const ::std::os::raw::c_char, - result: *mut ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - hintmsg: *mut *const ::std::os::raw::c_char, - ) -> bool; +impl Default for GistEntryVector { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } #[pg_guard] extern "C" { - pub fn parse_real( - value: *const ::std::os::raw::c_char, - result: *mut f64, - flags: ::std::os::raw::c_int, - hintmsg: *mut *const ::std::os::raw::c_char, - ) -> bool; + pub fn relation_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn set_config_option( - name: *const ::std::os::raw::c_char, - value: *const ::std::os::raw::c_char, - context: GucContext, - source: GucSource, - action: GucAction, - changeVal: bool, - elevel: ::std::os::raw::c_int, - is_reload: bool, - ) -> ::std::os::raw::c_int; + pub fn try_relation_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn AlterSystemSetConfigFile(altersysstmt: *mut AlterSystemStmt); + pub fn relation_openrv(relation: *const RangeVar, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn GetConfigOptionByName( - name: *const ::std::os::raw::c_char, - varname: *mut *const ::std::os::raw::c_char, + pub fn relation_openrv_extended( + relation: *const RangeVar, + lockmode: LOCKMODE, missing_ok: bool, - ) -> *mut ::std::os::raw::c_char; + ) -> Relation; } #[pg_guard] extern "C" { - pub fn GetConfigOptionByNum( - varnum: ::std::os::raw::c_int, - values: *mut *const ::std::os::raw::c_char, - noshow: *mut bool, - ); + pub fn relation_close(relation: Relation, lockmode: LOCKMODE); } -#[pg_guard] -extern "C" { - pub fn GetNumConfigOptions() -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TableScanDescData { + pub rs_rd: Relation, + pub rs_snapshot: *mut SnapshotData, + pub rs_nkeys: ::std::os::raw::c_int, + pub rs_key: *mut ScanKeyData, + pub rs_flags: uint32, + pub rs_parallel: *mut ParallelTableScanDescData, } -#[pg_guard] -extern "C" { - pub fn SetPGVariable(name: *const ::std::os::raw::c_char, args: *mut List, is_local: bool); +impl Default for TableScanDescData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn GetPGVariable(name: *const ::std::os::raw::c_char, dest: *mut DestReceiver); +pub type TableScanDesc = *mut TableScanDescData; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct ParallelTableScanDescData { + pub phs_relid: Oid, + pub phs_syncscan: bool, + pub phs_snapshot_any: bool, + pub phs_snapshot_off: Size, } -#[pg_guard] -extern "C" { - pub fn GetPGVariableResultDesc(name: *const ::std::os::raw::c_char) -> TupleDesc; +pub type ParallelTableScanDesc = *mut ParallelTableScanDescData; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct ParallelBlockTableScanDescData { + pub base: ParallelTableScanDescData, + pub phs_nblocks: BlockNumber, + pub phs_mutex: slock_t, + pub phs_startblock: BlockNumber, + pub phs_nallocated: pg_atomic_uint64, } -#[pg_guard] -extern "C" { - pub fn ExecSetVariableStmt(stmt: *mut VariableSetStmt, isTopLevel: bool); +pub type ParallelBlockTableScanDesc = *mut ParallelBlockTableScanDescData; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct IndexFetchTableData { + pub rel: Relation, } -#[pg_guard] -extern "C" { - pub fn ExtractSetVariableArgs(stmt: *mut VariableSetStmt) -> *mut ::std::os::raw::c_char; +impl Default for IndexFetchTableData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn ProcessGUCArray( - array: *mut ArrayType, - context: GucContext, - source: GucSource, - action: GucAction, - ); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct IndexScanDescData { + pub heapRelation: Relation, + pub indexRelation: Relation, + pub xs_snapshot: *mut SnapshotData, + pub numberOfKeys: ::std::os::raw::c_int, + pub numberOfOrderBys: ::std::os::raw::c_int, + pub keyData: *mut ScanKeyData, + pub orderByData: *mut ScanKeyData, + pub xs_want_itup: bool, + pub xs_temp_snap: bool, + pub kill_prior_tuple: bool, + pub ignore_killed_tuples: bool, + pub xactStartedInRecovery: bool, + pub opaque: *mut ::std::os::raw::c_void, + pub xs_itup: IndexTuple, + pub xs_itupdesc: *mut TupleDescData, + pub xs_hitup: HeapTuple, + pub xs_hitupdesc: *mut TupleDescData, + pub xs_heaptid: ItemPointerData, + pub xs_heap_continue: bool, + pub xs_heapfetch: *mut IndexFetchTableData, + pub xs_recheck: bool, + pub xs_orderbyvals: *mut Datum, + pub xs_orderbynulls: *mut bool, + pub xs_recheckorderby: bool, + pub parallel_scan: *mut ParallelIndexScanDescData, } -#[pg_guard] -extern "C" { - pub fn GUCArrayAdd( - array: *mut ArrayType, - name: *const ::std::os::raw::c_char, - value: *const ::std::os::raw::c_char, - ) -> *mut ArrayType; +impl Default for IndexScanDescData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } -#[pg_guard] -extern "C" { - pub fn GUCArrayDelete( - array: *mut ArrayType, - name: *const ::std::os::raw::c_char, - ) -> *mut ArrayType; +#[repr(C)] +#[derive(Debug, Default)] +pub struct ParallelIndexScanDescData { + pub ps_relid: Oid, + pub ps_indexid: Oid, + pub ps_offset: Size, + pub ps_snapshot_data: __IncompleteArrayField<::std::os::raw::c_char>, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct SysScanDescData { + pub heap_rel: Relation, + pub irel: Relation, + pub scan: *mut TableScanDescData, + pub iscan: *mut IndexScanDescData, + pub snapshot: *mut SnapshotData, + pub slot: *mut TupleTableSlot, +} +impl Default for SysScanDescData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } #[pg_guard] extern "C" { - pub fn GUCArrayReset(array: *mut ArrayType) -> *mut ArrayType; + pub fn table_open(relationId: Oid, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn EstimateGUCStateSpace() -> Size; + pub fn table_openrv(relation: *const RangeVar, lockmode: LOCKMODE) -> Relation; } #[pg_guard] extern "C" { - pub fn SerializeGUCState(maxsize: Size, start_address: *mut ::std::os::raw::c_char); + pub fn table_openrv_extended( + relation: *const RangeVar, + lockmode: LOCKMODE, + missing_ok: bool, + ) -> Relation; } #[pg_guard] extern "C" { - pub fn RestoreGUCState(gucstate: *mut ::std::os::raw::c_void); + pub fn table_close(relation: Relation, lockmode: LOCKMODE); +} +pub type EOM_get_flat_size_method = + ::std::option::Option Size>; +pub type EOM_flatten_into_method = ::std::option::Option< + unsafe extern "C" fn( + eohptr: *mut ExpandedObjectHeader, + result: *mut ::std::os::raw::c_void, + allocated_size: Size, + ), +>; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct ExpandedObjectMethods { + pub get_flat_size: EOM_get_flat_size_method, + pub flatten_into: EOM_flatten_into_method, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ExpandedObjectHeader { + pub vl_len_: int32, + pub eoh_methods: *const ExpandedObjectMethods, + pub eoh_context: MemoryContext, + pub eoh_rw_ptr: [::std::os::raw::c_char; 10usize], + pub eoh_ro_ptr: [::std::os::raw::c_char; 10usize], +} +impl Default for ExpandedObjectHeader { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } #[pg_guard] extern "C" { - pub static mut GUC_check_errmsg_string: *mut ::std::os::raw::c_char; + pub fn DatumGetEOHP(d: Datum) -> *mut ExpandedObjectHeader; } #[pg_guard] extern "C" { - pub static mut GUC_check_errdetail_string: *mut ::std::os::raw::c_char; + pub fn EOH_init_header( + eohptr: *mut ExpandedObjectHeader, + methods: *const ExpandedObjectMethods, + obj_context: MemoryContext, + ); } #[pg_guard] extern "C" { - pub static mut GUC_check_errhint_string: *mut ::std::os::raw::c_char; + pub fn EOH_get_flat_size(eohptr: *mut ExpandedObjectHeader) -> Size; } #[pg_guard] extern "C" { - pub fn GUC_check_errcode(sqlerrcode: ::std::os::raw::c_int); + pub fn EOH_flatten_into( + eohptr: *mut ExpandedObjectHeader, + result: *mut ::std::os::raw::c_void, + allocated_size: Size, + ); } #[pg_guard] extern "C" { - pub fn check_default_tablespace( - newval: *mut *mut ::std::os::raw::c_char, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool; + pub fn MakeExpandedObjectReadOnlyInternal(d: Datum) -> Datum; } #[pg_guard] extern "C" { - pub fn check_temp_tablespaces( - newval: *mut *mut ::std::os::raw::c_char, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool; + pub fn TransferExpandedObject(d: Datum, new_parent: MemoryContext) -> Datum; } #[pg_guard] extern "C" { - pub fn assign_temp_tablespaces( - newval: *const ::std::os::raw::c_char, - extra: *mut ::std::os::raw::c_void, - ); + pub fn DeleteExpandedObject(d: Datum); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct ArrayType { + pub vl_len_: int32, + pub ndim: ::std::os::raw::c_int, + pub dataoffset: int32, + pub elemtype: Oid, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ExpandedArrayHeader { + pub hdr: ExpandedObjectHeader, + pub ea_magic: ::std::os::raw::c_int, + pub ndims: ::std::os::raw::c_int, + pub dims: *mut ::std::os::raw::c_int, + pub lbound: *mut ::std::os::raw::c_int, + pub element_type: Oid, + pub typlen: int16, + pub typbyval: bool, + pub typalign: ::std::os::raw::c_char, + pub dvalues: *mut Datum, + pub dnulls: *mut bool, + pub dvalueslen: ::std::os::raw::c_int, + pub nelems: ::std::os::raw::c_int, + pub flat_size: Size, + pub fvalue: *mut ArrayType, + pub fstartptr: *mut ::std::os::raw::c_char, + pub fendptr: *mut ::std::os::raw::c_char, +} +impl Default for ExpandedArrayHeader { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union AnyArrayType { + pub flt: ArrayType, + pub xpn: ExpandedArrayHeader, + _bindgen_union_align: [u64; 17usize], +} +impl Default for AnyArrayType { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayBuildState { + pub mcontext: MemoryContext, + pub dvalues: *mut Datum, + pub dnulls: *mut bool, + pub alen: ::std::os::raw::c_int, + pub nelems: ::std::os::raw::c_int, + pub element_type: Oid, + pub typlen: int16, + pub typbyval: bool, + pub typalign: ::std::os::raw::c_char, + pub private_cxt: bool, +} +impl Default for ArrayBuildState { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayBuildStateArr { + pub mcontext: MemoryContext, + pub data: *mut ::std::os::raw::c_char, + pub nullbitmap: *mut bits8, + pub abytes: ::std::os::raw::c_int, + pub nbytes: ::std::os::raw::c_int, + pub aitems: ::std::os::raw::c_int, + pub nitems: ::std::os::raw::c_int, + pub ndims: ::std::os::raw::c_int, + pub dims: [::std::os::raw::c_int; 6usize], + pub lbs: [::std::os::raw::c_int; 6usize], + pub array_type: Oid, + pub element_type: Oid, + pub private_cxt: bool, +} +impl Default for ArrayBuildStateArr { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayBuildStateAny { + pub scalarstate: *mut ArrayBuildState, + pub arraystate: *mut ArrayBuildStateArr, +} +impl Default for ArrayBuildStateAny { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayMetaState { + pub element_type: Oid, + pub typlen: int16, + pub typbyval: bool, + pub typalign: ::std::os::raw::c_char, + pub typdelim: ::std::os::raw::c_char, + pub typioparam: Oid, + pub typiofunc: Oid, + pub proc_: FmgrInfo, +} +impl Default for ArrayMetaState { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayMapState { + pub inp_extra: ArrayMetaState, + pub ret_extra: ArrayMetaState, +} +impl Default for ArrayMapState { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ArrayIteratorData { + _unused: [u8; 0], +} +pub type ArrayIterator = *mut ArrayIteratorData; #[pg_guard] extern "C" { - pub fn check_search_path( - newval: *mut *mut ::std::os::raw::c_char, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool; + pub static mut Array_nulls: bool; } #[pg_guard] extern "C" { - pub fn assign_search_path( - newval: *const ::std::os::raw::c_char, - extra: *mut ::std::os::raw::c_void, + pub fn CopyArrayEls( + array: *mut ArrayType, + values: *mut Datum, + nulls: *mut bool, + nitems: ::std::os::raw::c_int, + typlen: ::std::os::raw::c_int, + typbyval: bool, + typalign: ::std::os::raw::c_char, + freedata: bool, ); } #[pg_guard] extern "C" { - pub fn check_wal_buffers( - newval: *mut ::std::os::raw::c_int, - extra: *mut *mut ::std::os::raw::c_void, - source: GucSource, - ) -> bool; + pub fn array_get_element( + arraydatum: Datum, + nSubscripts: ::std::os::raw::c_int, + indx: *mut ::std::os::raw::c_int, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + isNull: *mut bool, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn assign_xlog_sync_method( - new_sync_method: ::std::os::raw::c_int, - extra: *mut ::std::os::raw::c_void, - ); + pub fn array_set_element( + arraydatum: Datum, + nSubscripts: ::std::os::raw::c_int, + indx: *mut ::std::os::raw::c_int, + dataValue: Datum, + isNull: bool, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogBeginInsert(); + pub fn array_get_slice( + arraydatum: Datum, + nSubscripts: ::std::os::raw::c_int, + upperIndx: *mut ::std::os::raw::c_int, + lowerIndx: *mut ::std::os::raw::c_int, + upperProvided: *mut bool, + lowerProvided: *mut bool, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogSetRecordFlags(flags: uint8); + pub fn array_set_slice( + arraydatum: Datum, + nSubscripts: ::std::os::raw::c_int, + upperIndx: *mut ::std::os::raw::c_int, + lowerIndx: *mut ::std::os::raw::c_int, + upperProvided: *mut bool, + lowerProvided: *mut bool, + srcArrayDatum: Datum, + isNull: bool, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogInsert(rmid: RmgrId, info: uint8) -> XLogRecPtr; + pub fn array_ref( + array: *mut ArrayType, + nSubscripts: ::std::os::raw::c_int, + indx: *mut ::std::os::raw::c_int, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + isNull: *mut bool, + ) -> Datum; +} +#[pg_guard] +extern "C" { + pub fn array_set( + array: *mut ArrayType, + nSubscripts: ::std::os::raw::c_int, + indx: *mut ::std::os::raw::c_int, + dataValue: Datum, + isNull: bool, + arraytyplen: ::std::os::raw::c_int, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> *mut ArrayType; +} +#[pg_guard] +extern "C" { + pub fn array_map( + arrayd: Datum, + exprstate: *mut ExprState, + econtext: *mut ExprContext, + retType: Oid, + amstate: *mut ArrayMapState, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogEnsureRecordSpace( - max_block_id: ::std::os::raw::c_int, - ndatas: ::std::os::raw::c_int, + pub fn array_bitmap_copy( + destbitmap: *mut bits8, + destoffset: ::std::os::raw::c_int, + srcbitmap: *const bits8, + srcoffset: ::std::os::raw::c_int, + nitems: ::std::os::raw::c_int, ); } #[pg_guard] extern "C" { - pub fn XLogRegisterData(data: *mut ::std::os::raw::c_char, len: ::std::os::raw::c_int); + pub fn construct_array( + elems: *mut Datum, + nelems: ::std::os::raw::c_int, + elmtype: Oid, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn XLogRegisterBuffer(block_id: uint8, buffer: Buffer, flags: uint8); + pub fn construct_md_array( + elems: *mut Datum, + nulls: *mut bool, + ndims: ::std::os::raw::c_int, + dims: *mut ::std::os::raw::c_int, + lbs: *mut ::std::os::raw::c_int, + elmtype: Oid, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + ) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn XLogRegisterBlock( - block_id: uint8, - rnode: *mut RelFileNode, - forknum: ForkNumber, - blknum: BlockNumber, - page: *mut ::std::os::raw::c_char, - flags: uint8, - ); + pub fn construct_empty_array(elmtype: Oid) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn XLogRegisterBufData( - block_id: uint8, - data: *mut ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - ); + pub fn construct_empty_expanded_array( + element_type: Oid, + parentcontext: MemoryContext, + metacache: *mut ArrayMetaState, + ) -> *mut ExpandedArrayHeader; } #[pg_guard] extern "C" { - pub fn XLogResetInsertion(); + pub fn deconstruct_array( + array: *mut ArrayType, + elmtype: Oid, + elmlen: ::std::os::raw::c_int, + elmbyval: bool, + elmalign: ::std::os::raw::c_char, + elemsp: *mut *mut Datum, + nullsp: *mut *mut bool, + nelemsp: *mut ::std::os::raw::c_int, + ); } #[pg_guard] extern "C" { - pub fn XLogCheckBufferNeedsBackup(buffer: Buffer) -> bool; + pub fn array_contains_nulls(array: *mut ArrayType) -> bool; } #[pg_guard] extern "C" { - pub fn log_newpage( - rnode: *mut RelFileNode, - forkNum: ForkNumber, - blk: BlockNumber, - page: *mut ::std::os::raw::c_char, - page_std: bool, - ) -> XLogRecPtr; + pub fn initArrayResult( + element_type: Oid, + rcontext: MemoryContext, + subcontext: bool, + ) -> *mut ArrayBuildState; } #[pg_guard] extern "C" { - pub fn log_newpage_buffer(buffer: Buffer, page_std: bool) -> XLogRecPtr; + pub fn accumArrayResult( + astate: *mut ArrayBuildState, + dvalue: Datum, + disnull: bool, + element_type: Oid, + rcontext: MemoryContext, + ) -> *mut ArrayBuildState; } #[pg_guard] extern "C" { - pub fn log_newpage_range( - rel: Relation, - forkNum: ForkNumber, - startblk: BlockNumber, - endblk: BlockNumber, - page_std: bool, - ); + pub fn makeArrayResult(astate: *mut ArrayBuildState, rcontext: MemoryContext) -> Datum; } #[pg_guard] extern "C" { - pub fn XLogSaveBufferForHint(buffer: Buffer, buffer_std: bool) -> XLogRecPtr; + pub fn makeMdArrayResult( + astate: *mut ArrayBuildState, + ndims: ::std::os::raw::c_int, + dims: *mut ::std::os::raw::c_int, + lbs: *mut ::std::os::raw::c_int, + rcontext: MemoryContext, + release: bool, + ) -> Datum; } #[pg_guard] extern "C" { - pub fn InitXLogInsert(); + pub fn initArrayResultArr( + array_type: Oid, + element_type: Oid, + rcontext: MemoryContext, + subcontext: bool, + ) -> *mut ArrayBuildStateArr; } #[pg_guard] extern "C" { - pub static mut sync_method: ::std::os::raw::c_int; + pub fn accumArrayResultArr( + astate: *mut ArrayBuildStateArr, + dvalue: Datum, + disnull: bool, + array_type: Oid, + rcontext: MemoryContext, + ) -> *mut ArrayBuildStateArr; } #[pg_guard] extern "C" { - pub static mut ThisTimeLineID: TimeLineID; + pub fn makeArrayResultArr( + astate: *mut ArrayBuildStateArr, + rcontext: MemoryContext, + release: bool, + ) -> Datum; } #[pg_guard] extern "C" { - pub static mut InRecovery: bool; + pub fn initArrayResultAny( + input_type: Oid, + rcontext: MemoryContext, + subcontext: bool, + ) -> *mut ArrayBuildStateAny; } -pub const HotStandbyState_STANDBY_DISABLED: HotStandbyState = 0; -pub const HotStandbyState_STANDBY_INITIALIZED: HotStandbyState = 1; -pub const HotStandbyState_STANDBY_SNAPSHOT_PENDING: HotStandbyState = 2; -pub const HotStandbyState_STANDBY_SNAPSHOT_READY: HotStandbyState = 3; -pub type HotStandbyState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut standbyState: HotStandbyState; + pub fn accumArrayResultAny( + astate: *mut ArrayBuildStateAny, + dvalue: Datum, + disnull: bool, + input_type: Oid, + rcontext: MemoryContext, + ) -> *mut ArrayBuildStateAny; } -pub const RecoveryTargetType_RECOVERY_TARGET_UNSET: RecoveryTargetType = 0; -pub const RecoveryTargetType_RECOVERY_TARGET_XID: RecoveryTargetType = 1; -pub const RecoveryTargetType_RECOVERY_TARGET_TIME: RecoveryTargetType = 2; -pub const RecoveryTargetType_RECOVERY_TARGET_NAME: RecoveryTargetType = 3; -pub const RecoveryTargetType_RECOVERY_TARGET_LSN: RecoveryTargetType = 4; -pub const RecoveryTargetType_RECOVERY_TARGET_IMMEDIATE: RecoveryTargetType = 5; -pub type RecoveryTargetType = ::std::os::raw::c_uint; -pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_CONTROLFILE: - RecoveryTargetTimeLineGoal = 0; -pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_LATEST: RecoveryTargetTimeLineGoal = - 1; -pub const RecoveryTargetTimeLineGoal_RECOVERY_TARGET_TIMELINE_NUMERIC: RecoveryTargetTimeLineGoal = - 2; -pub type RecoveryTargetTimeLineGoal = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut ProcLastRecPtr: XLogRecPtr; + pub fn makeArrayResultAny( + astate: *mut ArrayBuildStateAny, + rcontext: MemoryContext, + release: bool, + ) -> Datum; } #[pg_guard] extern "C" { - pub static mut XactLastRecEnd: XLogRecPtr; + pub fn array_create_iterator( + arr: *mut ArrayType, + slice_ndim: ::std::os::raw::c_int, + mstate: *mut ArrayMetaState, + ) -> ArrayIterator; } #[pg_guard] extern "C" { - pub static mut XactLastCommitEnd: XLogRecPtr; + pub fn array_iterate(iterator: ArrayIterator, value: *mut Datum, isnull: *mut bool) -> bool; } #[pg_guard] extern "C" { - pub static mut reachedConsistency: bool; + pub fn array_free_iterator(iterator: ArrayIterator); } #[pg_guard] extern "C" { - pub static mut wal_segment_size: ::std::os::raw::c_int; + pub fn ArrayGetOffset( + n: ::std::os::raw::c_int, + dim: *const ::std::os::raw::c_int, + lb: *const ::std::os::raw::c_int, + indx: *const ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut min_wal_size_mb: ::std::os::raw::c_int; + pub fn ArrayGetOffset0( + n: ::std::os::raw::c_int, + tup: *const ::std::os::raw::c_int, + scale: *const ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut max_wal_size_mb: ::std::os::raw::c_int; + pub fn ArrayGetNItems( + ndim: ::std::os::raw::c_int, + dims: *const ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut wal_keep_size_mb: ::std::os::raw::c_int; + pub fn mda_get_range( + n: ::std::os::raw::c_int, + span: *mut ::std::os::raw::c_int, + st: *const ::std::os::raw::c_int, + endp: *const ::std::os::raw::c_int, + ); } #[pg_guard] extern "C" { - pub static mut max_slot_wal_keep_size_mb: ::std::os::raw::c_int; + pub fn mda_get_prod( + n: ::std::os::raw::c_int, + range: *const ::std::os::raw::c_int, + prod: *mut ::std::os::raw::c_int, + ); } #[pg_guard] extern "C" { - pub static mut XLOGbuffers: ::std::os::raw::c_int; + pub fn mda_get_offset_values( + n: ::std::os::raw::c_int, + dist: *mut ::std::os::raw::c_int, + prod: *const ::std::os::raw::c_int, + span: *const ::std::os::raw::c_int, + ); } #[pg_guard] extern "C" { - pub static mut XLogArchiveTimeout: ::std::os::raw::c_int; + pub fn mda_next_tuple( + n: ::std::os::raw::c_int, + curr: *mut ::std::os::raw::c_int, + span: *const ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut wal_retrieve_retry_interval: ::std::os::raw::c_int; + pub fn ArrayGetIntegerTypmods(arr: *mut ArrayType, n: *mut ::std::os::raw::c_int) + -> *mut int32; } #[pg_guard] extern "C" { - pub static mut XLogArchiveCommand: *mut ::std::os::raw::c_char; + pub fn expand_array( + arraydatum: Datum, + parentcontext: MemoryContext, + metacache: *mut ArrayMetaState, + ) -> Datum; } #[pg_guard] extern "C" { - pub static mut EnableHotStandby: bool; + pub fn DatumGetExpandedArray(d: Datum) -> *mut ExpandedArrayHeader; } #[pg_guard] extern "C" { - pub static mut fullPageWrites: bool; + pub fn DatumGetExpandedArrayX( + d: Datum, + metacache: *mut ArrayMetaState, + ) -> *mut ExpandedArrayHeader; } #[pg_guard] extern "C" { - pub static mut wal_log_hints: bool; + pub fn DatumGetAnyArrayP(d: Datum) -> *mut AnyArrayType; } #[pg_guard] extern "C" { - pub static mut wal_compression: bool; + pub fn deconstruct_expanded_array(eah: *mut ExpandedArrayHeader); } -#[pg_guard] -extern "C" { - pub static mut wal_init_zero: bool; +pub const GucContext_PGC_INTERNAL: GucContext = 0; +pub const GucContext_PGC_POSTMASTER: GucContext = 1; +pub const GucContext_PGC_SIGHUP: GucContext = 2; +pub const GucContext_PGC_SU_BACKEND: GucContext = 3; +pub const GucContext_PGC_BACKEND: GucContext = 4; +pub const GucContext_PGC_SUSET: GucContext = 5; +pub const GucContext_PGC_USERSET: GucContext = 6; +pub type GucContext = ::std::os::raw::c_uint; +pub const GucSource_PGC_S_DEFAULT: GucSource = 0; +pub const GucSource_PGC_S_DYNAMIC_DEFAULT: GucSource = 1; +pub const GucSource_PGC_S_ENV_VAR: GucSource = 2; +pub const GucSource_PGC_S_FILE: GucSource = 3; +pub const GucSource_PGC_S_ARGV: GucSource = 4; +pub const GucSource_PGC_S_GLOBAL: GucSource = 5; +pub const GucSource_PGC_S_DATABASE: GucSource = 6; +pub const GucSource_PGC_S_USER: GucSource = 7; +pub const GucSource_PGC_S_DATABASE_USER: GucSource = 8; +pub const GucSource_PGC_S_CLIENT: GucSource = 9; +pub const GucSource_PGC_S_OVERRIDE: GucSource = 10; +pub const GucSource_PGC_S_INTERACTIVE: GucSource = 11; +pub const GucSource_PGC_S_TEST: GucSource = 12; +pub const GucSource_PGC_S_SESSION: GucSource = 13; +pub type GucSource = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ConfigVariable { + pub name: *mut ::std::os::raw::c_char, + pub value: *mut ::std::os::raw::c_char, + pub errmsg: *mut ::std::os::raw::c_char, + pub filename: *mut ::std::os::raw::c_char, + pub sourceline: ::std::os::raw::c_int, + pub ignore: bool, + pub applied: bool, + pub next: *mut ConfigVariable, } -#[pg_guard] -extern "C" { - pub static mut wal_recycle: bool; +impl Default for ConfigVariable { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } #[pg_guard] extern "C" { - pub static mut wal_consistency_checking: *mut bool; + pub fn ParseConfigFile( + config_file: *const ::std::os::raw::c_char, + strict: bool, + calling_file: *const ::std::os::raw::c_char, + calling_lineno: ::std::os::raw::c_int, + depth: ::std::os::raw::c_int, + elevel: ::std::os::raw::c_int, + head_p: *mut *mut ConfigVariable, + tail_p: *mut *mut ConfigVariable, + ) -> bool; } #[pg_guard] extern "C" { - pub static mut wal_consistency_checking_string: *mut ::std::os::raw::c_char; + pub fn ParseConfigFp( + fp: *mut FILE, + config_file: *const ::std::os::raw::c_char, + depth: ::std::os::raw::c_int, + elevel: ::std::os::raw::c_int, + head_p: *mut *mut ConfigVariable, + tail_p: *mut *mut ConfigVariable, + ) -> bool; } #[pg_guard] extern "C" { - pub static mut log_checkpoints: bool; + pub fn ParseConfigDirectory( + includedir: *const ::std::os::raw::c_char, + calling_file: *const ::std::os::raw::c_char, + calling_lineno: ::std::os::raw::c_int, + depth: ::std::os::raw::c_int, + elevel: ::std::os::raw::c_int, + head_p: *mut *mut ConfigVariable, + tail_p: *mut *mut ConfigVariable, + ) -> bool; } #[pg_guard] extern "C" { - pub static mut recoveryRestoreCommand: *mut ::std::os::raw::c_char; + pub fn FreeConfigVariables(list: *mut ConfigVariable); } -#[pg_guard] -extern "C" { - pub static mut recoveryEndCommand: *mut ::std::os::raw::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct config_enum_entry { + pub name: *const ::std::os::raw::c_char, + pub val: ::std::os::raw::c_int, + pub hidden: bool, } -#[pg_guard] -extern "C" { - pub static mut archiveCleanupCommand: *mut ::std::os::raw::c_char; +impl Default for config_enum_entry { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } } +pub type GucBoolCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut bool, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucIntCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut ::std::os::raw::c_int, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucRealCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut f64, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucStringCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut *mut ::std::os::raw::c_char, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucEnumCheckHook = ::std::option::Option< + unsafe extern "C" fn( + newval: *mut ::std::os::raw::c_int, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool, +>; +pub type GucBoolAssignHook = + ::std::option::Option; +pub type GucIntAssignHook = ::std::option::Option< + unsafe extern "C" fn(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void), +>; +pub type GucRealAssignHook = + ::std::option::Option; +pub type GucStringAssignHook = ::std::option::Option< + unsafe extern "C" fn(newval: *const ::std::os::raw::c_char, extra: *mut ::std::os::raw::c_void), +>; +pub type GucEnumAssignHook = ::std::option::Option< + unsafe extern "C" fn(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void), +>; +pub type GucShowHook = + ::std::option::Option *const ::std::os::raw::c_char>; +pub const GucAction_GUC_ACTION_SET: GucAction = 0; +pub const GucAction_GUC_ACTION_LOCAL: GucAction = 1; +pub const GucAction_GUC_ACTION_SAVE: GucAction = 2; +pub type GucAction = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut recoveryTargetInclusive: bool; + pub static mut Debug_print_plan: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetAction: ::std::os::raw::c_int; + pub static mut Debug_print_parse: bool; } #[pg_guard] extern "C" { - pub static mut recovery_min_apply_delay: ::std::os::raw::c_int; + pub static mut Debug_print_rewritten: bool; } #[pg_guard] extern "C" { - pub static mut PrimaryConnInfo: *mut ::std::os::raw::c_char; + pub static mut Debug_pretty_print: bool; } #[pg_guard] extern "C" { - pub static mut PrimarySlotName: *mut ::std::os::raw::c_char; + pub static mut log_parser_stats: bool; } #[pg_guard] extern "C" { - pub static mut wal_receiver_create_temp_slot: bool; + pub static mut log_planner_stats: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetXid: TransactionId; + pub static mut log_executor_stats: bool; } #[pg_guard] extern "C" { - pub static mut recovery_target_time_string: *mut ::std::os::raw::c_char; + pub static mut log_statement_stats: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetName: *const ::std::os::raw::c_char; + pub static mut log_btree_build_stats: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetLSN: XLogRecPtr; + pub static mut check_function_bodies: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTarget: RecoveryTargetType; + pub static mut session_auth_is_superuser: bool; } #[pg_guard] extern "C" { - pub static mut PromoteTriggerFile: *mut ::std::os::raw::c_char; + pub static mut log_duration: bool; } #[pg_guard] extern "C" { - pub static mut recoveryTargetTimeLineGoal: RecoveryTargetTimeLineGoal; + pub static mut log_parameter_max_length: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut recoveryTargetTLIRequested: TimeLineID; + pub static mut log_parameter_max_length_on_error: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut recoveryTargetTLI: TimeLineID; + pub static mut log_min_error_statement: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut CheckPointSegments: ::std::os::raw::c_int; + pub static mut log_min_messages: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut StandbyModeRequested: bool; + pub static mut client_min_messages: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut StandbyMode: bool; + pub static mut log_min_duration_sample: ::std::os::raw::c_int; } -pub const ArchiveMode_ARCHIVE_MODE_OFF: ArchiveMode = 0; -pub const ArchiveMode_ARCHIVE_MODE_ON: ArchiveMode = 1; -pub const ArchiveMode_ARCHIVE_MODE_ALWAYS: ArchiveMode = 2; -pub type ArchiveMode = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut XLogArchiveMode: ::std::os::raw::c_int; + pub static mut log_min_duration_statement: ::std::os::raw::c_int; } -pub const WalLevel_WAL_LEVEL_MINIMAL: WalLevel = 0; -pub const WalLevel_WAL_LEVEL_REPLICA: WalLevel = 1; -pub const WalLevel_WAL_LEVEL_LOGICAL: WalLevel = 2; -pub type WalLevel = ::std::os::raw::c_uint; -pub const RecoveryState_RECOVERY_STATE_CRASH: RecoveryState = 0; -pub const RecoveryState_RECOVERY_STATE_ARCHIVE: RecoveryState = 1; -pub const RecoveryState_RECOVERY_STATE_DONE: RecoveryState = 2; -pub type RecoveryState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub static mut wal_level: ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct CheckpointStatsData { - pub ckpt_start_t: TimestampTz, - pub ckpt_write_t: TimestampTz, - pub ckpt_sync_t: TimestampTz, - pub ckpt_sync_end_t: TimestampTz, - pub ckpt_end_t: TimestampTz, - pub ckpt_bufs_written: ::std::os::raw::c_int, - pub ckpt_segs_added: ::std::os::raw::c_int, - pub ckpt_segs_removed: ::std::os::raw::c_int, - pub ckpt_segs_recycled: ::std::os::raw::c_int, - pub ckpt_sync_rels: ::std::os::raw::c_int, - pub ckpt_longest_sync: uint64, - pub ckpt_agg_sync_time: uint64, + pub static mut log_temp_files: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub static mut CheckpointStats: CheckpointStatsData; -} -pub const WALAvailability_WALAVAIL_INVALID_LSN: WALAvailability = 0; -pub const WALAvailability_WALAVAIL_RESERVED: WALAvailability = 1; -pub const WALAvailability_WALAVAIL_EXTENDED: WALAvailability = 2; -pub const WALAvailability_WALAVAIL_UNRESERVED: WALAvailability = 3; -pub const WALAvailability_WALAVAIL_REMOVED: WALAvailability = 4; -pub type WALAvailability = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XLogRecData { - _unused: [u8; 0], + pub static mut log_statement_sample_rate: f64; } #[pg_guard] extern "C" { - pub fn XLogInsertRecord( - rdata: *mut XLogRecData, - fpw_lsn: XLogRecPtr, - flags: uint8, - num_fpi: ::std::os::raw::c_int, - ) -> XLogRecPtr; + pub static mut log_xact_sample_rate: f64; } #[pg_guard] extern "C" { - pub fn XLogFlush(RecPtr: XLogRecPtr); + pub static mut backtrace_functions: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogBackgroundFlush() -> bool; + pub static mut backtrace_symbol_list: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogNeedsFlush(RecPtr: XLogRecPtr) -> bool; + pub static mut temp_file_limit: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn XLogFileInit( - segno: XLogSegNo, - use_existent: *mut bool, - use_lock: bool, - ) -> ::std::os::raw::c_int; + pub static mut num_temp_buffers: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn XLogFileOpen(segno: XLogSegNo) -> ::std::os::raw::c_int; + pub static mut cluster_name: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn CheckXLogRemoved(segno: XLogSegNo, tli: TimeLineID); + pub static mut ConfigFileName: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogGetLastRemovedSegno() -> XLogSegNo; + pub static mut HbaFileName: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogSetAsyncXactLSN(record: XLogRecPtr); + pub static mut IdentFileName: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogSetReplicationSlotMinimumLSN(lsn: XLogRecPtr); + pub static mut external_pid_file: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn xlog_redo(record: *mut XLogReaderState); + pub static mut application_name: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn xlog_desc(buf: StringInfo, record: *mut XLogReaderState); + pub static mut tcp_keepalives_idle: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn xlog_identify(info: uint8) -> *const ::std::os::raw::c_char; + pub static mut tcp_keepalives_interval: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn issue_xlog_fsync(fd: ::std::os::raw::c_int, segno: XLogSegNo); + pub static mut tcp_keepalives_count: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn RecoveryInProgress() -> bool; + pub static mut tcp_user_timeout: ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn GetRecoveryState() -> RecoveryState; + pub static mut trace_sort: bool; } #[pg_guard] extern "C" { - pub fn HotStandbyActive() -> bool; + pub fn SetConfigOption( + name: *const ::std::os::raw::c_char, + value: *const ::std::os::raw::c_char, + context: GucContext, + source: GucSource, + ); } #[pg_guard] extern "C" { - pub fn HotStandbyActiveInReplay() -> bool; + pub fn DefineCustomBoolVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut bool, + bootValue: bool, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucBoolCheckHook, + assign_hook: GucBoolAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn XLogInsertAllowed() -> bool; + pub fn DefineCustomIntVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut ::std::os::raw::c_int, + bootValue: ::std::os::raw::c_int, + minValue: ::std::os::raw::c_int, + maxValue: ::std::os::raw::c_int, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucIntCheckHook, + assign_hook: GucIntAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn GetXLogReceiptTime(rtime: *mut TimestampTz, fromStream: *mut bool); + pub fn DefineCustomRealVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut f64, + bootValue: f64, + minValue: f64, + maxValue: f64, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucRealCheckHook, + assign_hook: GucRealAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn GetXLogReplayRecPtr(replayTLI: *mut TimeLineID) -> XLogRecPtr; + pub fn DefineCustomStringVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut *mut ::std::os::raw::c_char, + bootValue: *const ::std::os::raw::c_char, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucStringCheckHook, + assign_hook: GucStringAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn GetXLogInsertRecPtr() -> XLogRecPtr; + pub fn DefineCustomEnumVariable( + name: *const ::std::os::raw::c_char, + short_desc: *const ::std::os::raw::c_char, + long_desc: *const ::std::os::raw::c_char, + valueAddr: *mut ::std::os::raw::c_int, + bootValue: ::std::os::raw::c_int, + options: *const config_enum_entry, + context: GucContext, + flags: ::std::os::raw::c_int, + check_hook: GucEnumCheckHook, + assign_hook: GucEnumAssignHook, + show_hook: GucShowHook, + ); } #[pg_guard] extern "C" { - pub fn GetXLogWriteRecPtr() -> XLogRecPtr; + pub fn EmitWarningsOnPlaceholders(className: *const ::std::os::raw::c_char); } #[pg_guard] extern "C" { - pub fn RecoveryIsPaused() -> bool; + pub fn GetConfigOption( + name: *const ::std::os::raw::c_char, + missing_ok: bool, + restrict_privileged: bool, + ) -> *const ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn SetRecoveryPause(recoveryPause: bool); + pub fn GetConfigOptionResetString( + name: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn GetLatestXTime() -> TimestampTz; + pub fn GetConfigOptionFlags( + name: *const ::std::os::raw::c_char, + missing_ok: bool, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn GetCurrentChunkReplayStartTime() -> TimestampTz; + pub fn ProcessConfigFile(context: GucContext); } #[pg_guard] extern "C" { - pub fn UpdateControlFile(); + pub fn InitializeGUCOptions(); } #[pg_guard] extern "C" { - pub fn GetSystemIdentifier() -> uint64; + pub fn SelectConfigFiles( + userDoption: *const ::std::os::raw::c_char, + progname: *const ::std::os::raw::c_char, + ) -> bool; } #[pg_guard] extern "C" { - pub fn GetMockAuthenticationNonce() -> *mut ::std::os::raw::c_char; + pub fn ResetAllOptions(); } #[pg_guard] extern "C" { - pub fn DataChecksumsEnabled() -> bool; + pub fn AtStart_GUC(); } #[pg_guard] extern "C" { - pub fn GetFakeLSNForUnloggedRel() -> XLogRecPtr; + pub fn NewGUCNestLevel() -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn XLOGShmemSize() -> Size; + pub fn AtEOXact_GUC(isCommit: bool, nestLevel: ::std::os::raw::c_int); } #[pg_guard] extern "C" { - pub fn XLOGShmemInit(); + pub fn BeginReportingGUCOptions(); } #[pg_guard] extern "C" { - pub fn BootStrapXLOG(); + pub fn ParseLongOption( + string: *const ::std::os::raw::c_char, + name: *mut *mut ::std::os::raw::c_char, + value: *mut *mut ::std::os::raw::c_char, + ); } #[pg_guard] extern "C" { - pub fn LocalProcessControlFile(reset: bool); + pub fn parse_int( + value: *const ::std::os::raw::c_char, + result: *mut ::std::os::raw::c_int, + flags: ::std::os::raw::c_int, + hintmsg: *mut *const ::std::os::raw::c_char, + ) -> bool; } #[pg_guard] extern "C" { - pub fn StartupXLOG(); + pub fn parse_real( + value: *const ::std::os::raw::c_char, + result: *mut f64, + flags: ::std::os::raw::c_int, + hintmsg: *mut *const ::std::os::raw::c_char, + ) -> bool; } #[pg_guard] extern "C" { - pub fn ShutdownXLOG(code: ::std::os::raw::c_int, arg: Datum); + pub fn set_config_option( + name: *const ::std::os::raw::c_char, + value: *const ::std::os::raw::c_char, + context: GucContext, + source: GucSource, + action: GucAction, + changeVal: bool, + elevel: ::std::os::raw::c_int, + is_reload: bool, + ) -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn InitXLOGAccess(); + pub fn AlterSystemSetConfigFile(altersysstmt: *mut AlterSystemStmt); } #[pg_guard] extern "C" { - pub fn CreateCheckPoint(flags: ::std::os::raw::c_int); + pub fn GetConfigOptionByName( + name: *const ::std::os::raw::c_char, + varname: *mut *const ::std::os::raw::c_char, + missing_ok: bool, + ) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn CreateRestartPoint(flags: ::std::os::raw::c_int) -> bool; + pub fn GetConfigOptionByNum( + varnum: ::std::os::raw::c_int, + values: *mut *const ::std::os::raw::c_char, + noshow: *mut bool, + ); } #[pg_guard] extern "C" { - pub fn GetWALAvailability(targetLSN: XLogRecPtr) -> WALAvailability; + pub fn GetNumConfigOptions() -> ::std::os::raw::c_int; } #[pg_guard] extern "C" { - pub fn CalculateMaxmumSafeLSN() -> XLogRecPtr; + pub fn SetPGVariable(name: *const ::std::os::raw::c_char, args: *mut List, is_local: bool); } #[pg_guard] extern "C" { - pub fn XLogPutNextOid(nextOid: Oid); + pub fn GetPGVariable(name: *const ::std::os::raw::c_char, dest: *mut DestReceiver); } #[pg_guard] extern "C" { - pub fn XLogRestorePoint(rpName: *const ::std::os::raw::c_char) -> XLogRecPtr; + pub fn GetPGVariableResultDesc(name: *const ::std::os::raw::c_char) -> TupleDesc; } #[pg_guard] extern "C" { - pub fn UpdateFullPageWrites(); + pub fn ExecSetVariableStmt(stmt: *mut VariableSetStmt, isTopLevel: bool); } #[pg_guard] extern "C" { - pub fn GetFullPageWriteInfo(RedoRecPtr_p: *mut XLogRecPtr, doPageWrites_p: *mut bool); + pub fn ExtractSetVariableArgs(stmt: *mut VariableSetStmt) -> *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn GetRedoRecPtr() -> XLogRecPtr; + pub fn ProcessGUCArray( + array: *mut ArrayType, + context: GucContext, + source: GucSource, + action: GucAction, + ); } #[pg_guard] extern "C" { - pub fn GetInsertRecPtr() -> XLogRecPtr; + pub fn GUCArrayAdd( + array: *mut ArrayType, + name: *const ::std::os::raw::c_char, + value: *const ::std::os::raw::c_char, + ) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn GetFlushRecPtr() -> XLogRecPtr; + pub fn GUCArrayDelete( + array: *mut ArrayType, + name: *const ::std::os::raw::c_char, + ) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn GetLastImportantRecPtr() -> XLogRecPtr; + pub fn GUCArrayReset(array: *mut ArrayType) -> *mut ArrayType; } #[pg_guard] extern "C" { - pub fn RemovePromoteSignalFiles(); + pub fn EstimateGUCStateSpace() -> Size; } #[pg_guard] extern "C" { - pub fn PromoteIsTriggered() -> bool; + pub fn SerializeGUCState(maxsize: Size, start_address: *mut ::std::os::raw::c_char); } #[pg_guard] extern "C" { - pub fn CheckPromoteSignal() -> bool; + pub fn RestoreGUCState(gucstate: *mut ::std::os::raw::c_void); } #[pg_guard] extern "C" { - pub fn WakeupRecovery(); + pub static mut GUC_check_errmsg_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn SetWalWriterSleeping(sleeping: bool); + pub static mut GUC_check_errdetail_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn StartupRequestWalReceiverRestart(); + pub static mut GUC_check_errhint_string: *mut ::std::os::raw::c_char; } #[pg_guard] extern "C" { - pub fn XLogRequestWalReceiverReply(); + pub fn GUC_check_errcode(sqlerrcode: ::std::os::raw::c_int); } #[pg_guard] extern "C" { - pub fn assign_max_wal_size(newval: ::std::os::raw::c_int, extra: *mut ::std::os::raw::c_void); + pub fn check_default_tablespace( + newval: *mut *mut ::std::os::raw::c_char, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool; } #[pg_guard] extern "C" { - pub fn assign_checkpoint_completion_target(newval: f64, extra: *mut ::std::os::raw::c_void); + pub fn check_temp_tablespaces( + newval: *mut *mut ::std::os::raw::c_char, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool; } -pub const SessionBackupState_SESSION_BACKUP_NONE: SessionBackupState = 0; -pub const SessionBackupState_SESSION_BACKUP_EXCLUSIVE: SessionBackupState = 1; -pub const SessionBackupState_SESSION_BACKUP_NON_EXCLUSIVE: SessionBackupState = 2; -pub type SessionBackupState = ::std::os::raw::c_uint; #[pg_guard] extern "C" { - pub fn do_pg_start_backup( - backupidstr: *const ::std::os::raw::c_char, - fast: bool, - starttli_p: *mut TimeLineID, - labelfile: StringInfo, - tablespaces: *mut *mut List, - tblspcmapfile: StringInfo, - infotbssize: bool, - needtblspcmapfile: bool, - ) -> XLogRecPtr; + pub fn assign_temp_tablespaces( + newval: *const ::std::os::raw::c_char, + extra: *mut ::std::os::raw::c_void, + ); } #[pg_guard] extern "C" { - pub fn do_pg_stop_backup( - labelfile: *mut ::std::os::raw::c_char, - waitforarchive: bool, - stoptli_p: *mut TimeLineID, - ) -> XLogRecPtr; + pub fn check_search_path( + newval: *mut *mut ::std::os::raw::c_char, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool; } #[pg_guard] extern "C" { - pub fn do_pg_abort_backup(code: ::std::os::raw::c_int, arg: Datum); + pub fn assign_search_path( + newval: *const ::std::os::raw::c_char, + extra: *mut ::std::os::raw::c_void, + ); } #[pg_guard] extern "C" { - pub fn register_persistent_abort_backup_handler(); + pub fn check_wal_buffers( + newval: *mut ::std::os::raw::c_int, + extra: *mut *mut ::std::os::raw::c_void, + source: GucSource, + ) -> bool; } #[pg_guard] extern "C" { - pub fn get_backup_status() -> SessionBackupState; + pub fn assign_xlog_sync_method( + new_sync_method: ::std::os::raw::c_int, + extra: *mut ::std::os::raw::c_void, + ); } #[repr(C)] #[derive(Copy, Clone)]