Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,324 changes: 678 additions & 646 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ version = "0.16.0"
cargo-pgrx = { path = "cargo-pgrx" }

[workspace.dependencies]
pgrx-macros = { path = "./pgrx-macros", version = "=0.16.0" }
pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.16.0" }
pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.16.0" }
pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.16.0" }
pgrx-bindgen = { path = "./pgrx-bindgen", version = "=0.16.0" }
pgrx-macros = { path = "./pgrx-macros", version = "=0.16.1" }
pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.16.1" }
pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.16.1" }
pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.16.1" }
pgrx-bindgen = { path = "./pgrx-bindgen", version = "=0.16.1" }

cargo_metadata = "0.18.0"
cargo-edit = "=0.13.2" # format-preserving edits to cargo.toml
Expand Down
2 changes: 1 addition & 1 deletion cargo-pgrx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[package]
name = "cargo-pgrx"
version = "0.16.0"
version = "0.16.1"
authors.workspace = true
license.workspace = true
description = "Cargo subcommand for 'pgrx' to make Postgres extension development easy"
Expand Down
4 changes: 2 additions & 2 deletions cargo-pgrx/src/templates/cargo_toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ pg18 = ["pgrx/pg18", "pgrx-tests/pg18" ]
pg_test = []

[dependencies]
pgrx = "=0.16.0"
pgrx = "=0.16.1"

[dev-dependencies]
pgrx-tests = "=0.16.0"
pgrx-tests = "=0.16.1"

[profile.dev]
panic = "unwind"
Expand Down
2 changes: 1 addition & 1 deletion pgrx-bindgen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "pgrx-bindgen"
description = "additional bindgen support for pgrx"
version = "0.16.0"
version = "0.16.1"
edition.workspace = true
license.workspace = true
homepage = "https://github.com/pgcentralfoundation/pgrx"
Expand Down
30 changes: 21 additions & 9 deletions pgrx-examples/hooks/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
#LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
#LICENSE
#LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
#LICENSE
#LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
#LICENSE
#LICENSE All rights reserved.
#LICENSE
#LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.

[package]
name = "hooks"
version = "0.0.0"
edition = "2021"
publish = false

[lib]
crate-type = ["cdylib", "lib"]
Expand All @@ -21,16 +32,17 @@ pg18 = ["pgrx/pg18", "pgrx-tests/pg18" ]
pg_test = []

[dependencies]
pgrx = "=0.16.0"
pgrx = { path = "../../pgrx", default-features = false }

[dev-dependencies]
pgrx-tests = "=0.16.0"
pgrx-tests = { path = "../../pgrx-tests" }

[profile.dev]
panic = "unwind"
# uncomment these if compiling outside of 'pgrx'
# [profile.dev]
# panic = "unwind"

[profile.release]
panic = "unwind"
opt-level = 3
lto = "fat"
codegen-units = 1
# [profile.release]
# panic = "unwind"
# opt-level = 3
# lto = "fat"
# codegen-units = 1
2 changes: 1 addition & 1 deletion pgrx-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[package]
name = "pgrx-macros"
version = "0.16.0"
version = "0.16.1"
authors.workspace = true
license.workspace = true
description = "Proc Macros for 'pgrx'"
Expand Down
2 changes: 1 addition & 1 deletion pgrx-pg-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[package]
name = "pgrx-pg-config"
version = "0.16.0"
version = "0.16.1"
authors.workspace = true
license.workspace = true
description = "A Postgres pg_config wrapper for 'pgrx'"
Expand Down
2 changes: 1 addition & 1 deletion pgrx-pg-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[package]
name = "pgrx-pg-sys"
version = "0.16.0"
version = "0.16.1"
authors.workspace = true
license.workspace = true
description = "Generated Rust bindings for Postgres internals, for use with 'pgrx'"
Expand Down
162 changes: 155 additions & 7 deletions pgrx-pg-sys/src/include/pg13.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,18 @@ pub const MAXIMUM_ALIGNOF: u32 = 8;
pub const MEMSET_LOOP_LIMIT: u32 = 1024;
pub const PACKAGE_BUGREPORT: &::core::ffi::CStr = c"[email protected]";
pub const PACKAGE_NAME: &::core::ffi::CStr = c"PostgreSQL";
pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 13.21";
pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 13.22";
pub const PACKAGE_TARNAME: &::core::ffi::CStr = c"postgresql";
pub const PACKAGE_URL: &::core::ffi::CStr = c"https://www.postgresql.org/";
pub const PACKAGE_VERSION: &::core::ffi::CStr = c"13.21";
pub const PACKAGE_VERSION: &::core::ffi::CStr = c"13.22";
pub const PG_KRB_SRVNAM: &::core::ffi::CStr = c"postgres";
pub const PG_MAJORVERSION: &::core::ffi::CStr = c"13";
pub const PG_MAJORVERSION_NUM: u32 = 13;
pub const PG_MINORVERSION_NUM: u32 = 21;
pub const PG_MINORVERSION_NUM: u32 = 22;
pub const PG_USE_STDBOOL: u32 = 1;
pub const PG_VERSION: &::core::ffi::CStr = c"13.21";
pub const PG_VERSION_NUM: u32 = 130021;
pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 13.21 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit" ;
pub const PG_VERSION: &::core::ffi::CStr = c"13.22";
pub const PG_VERSION_NUM: u32 = 130022;
pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 13.22 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit" ;
pub const RELSEG_SIZE: u32 = 131072;
pub const SIZEOF_BOOL: u32 = 1;
pub const SIZEOF_LONG: u32 = 8;
Expand Down Expand Up @@ -255,7 +255,7 @@ pub const PG_BINARY_A: &::core::ffi::CStr = c"a";
pub const PG_BINARY_R: &::core::ffi::CStr = c"r";
pub const PG_BINARY_W: &::core::ffi::CStr = c"w";
pub const PGINVALID_SOCKET: i32 = -1;
pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 13.21\n";
pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 13.22\n";
pub const EXE: &::core::ffi::CStr = c"";
pub const DEVNULL: &::core::ffi::CStr = c"/dev/null";
pub const USE_REPL_SNPRINTF: u32 = 1;
Expand Down Expand Up @@ -2311,6 +2311,19 @@ pub const LOG_METAINFO_DATAFILE_TMP: &::core::ffi::CStr = c"current_logfiles.tmp
pub const RBTXN_HAS_CATALOG_CHANGES: u32 = 1;
pub const RBTXN_IS_SUBXACT: u32 = 2;
pub const RBTXN_IS_SERIALIZED: u32 = 4;
pub const RBTXN_DISTR_INVAL_OVERFLOWED: u32 = 8;
pub const SYNC_REP_NO_WAIT: i32 = -1;
pub const SYNC_REP_WAIT_WRITE: u32 = 0;
pub const SYNC_REP_WAIT_FLUSH: u32 = 1;
pub const SYNC_REP_WAIT_APPLY: u32 = 2;
pub const NUM_SYNC_REP_WAIT_MODE: u32 = 3;
pub const SYNC_REP_NOT_WAITING: u32 = 0;
pub const SYNC_REP_WAITING: u32 = 1;
pub const SYNC_REP_WAIT_COMPLETE: u32 = 2;
pub const SYNC_REP_PRIORITY: u32 = 0;
pub const SYNC_REP_QUORUM: u32 = 1;
pub const SYNC_STANDBY_INIT: u32 = 1;
pub const SYNC_STANDBY_DEFINED: u32 = 2;
pub const STATS_MAX_DIMENSIONS: u32 = 8;
pub const STATS_NDISTINCT_MAGIC: u32 = 2740109220;
pub const STATS_NDISTINCT_TYPE_BASIC: u32 = 1;
Expand Down Expand Up @@ -27108,6 +27121,8 @@ pub struct ReorderBufferTXN {
pub invalidations: *mut SharedInvalidationMessage,
pub node: dlist_node,
pub size: Size,
pub ninvalidations_distributed: uint32,
pub invalidations_distributed: *mut SharedInvalidationMessage,
}
impl Default for ReorderBufferTXN {
fn default() -> Self {
Expand Down Expand Up @@ -27399,6 +27414,78 @@ impl Default for LogicalDecodingContext {
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SyncRepStandbyData {
pub pid: pid_t,
pub write: XLogRecPtr,
pub flush: XLogRecPtr,
pub apply: XLogRecPtr,
pub sync_standby_priority: ::core::ffi::c_int,
pub walsnd_index: ::core::ffi::c_int,
pub is_me: bool,
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct SyncRepConfigData {
pub config_size: ::core::ffi::c_int,
pub num_sync: ::core::ffi::c_int,
pub syncrep_method: uint8,
pub nmembers: ::core::ffi::c_int,
pub member_names: __IncompleteArrayField<::core::ffi::c_char>,
}
pub mod WalSndState {
pub type Type = ::core::ffi::c_uint;
pub const WALSNDSTATE_STARTUP: Type = 0;
pub const WALSNDSTATE_BACKUP: Type = 1;
pub const WALSNDSTATE_CATCHUP: Type = 2;
pub const WALSNDSTATE_STREAMING: Type = 3;
pub const WALSNDSTATE_STOPPING: Type = 4;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WalSnd {
pub pid: pid_t,
pub state: WalSndState::Type,
pub sentPtr: XLogRecPtr,
pub needreload: bool,
pub write: XLogRecPtr,
pub flush: XLogRecPtr,
pub apply: XLogRecPtr,
pub writeLag: TimeOffset,
pub flushLag: TimeOffset,
pub applyLag: TimeOffset,
pub sync_standby_priority: ::core::ffi::c_int,
pub mutex: slock_t,
pub latch: *mut Latch,
pub replyTime: TimestampTz,
}
impl Default for WalSnd {
fn default() -> Self {
let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
unsafe {
::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug)]
pub struct WalSndCtlData {
pub SyncRepQueue: [SHM_QUEUE; 3usize],
pub lsn: [XLogRecPtr; 3usize],
pub sync_standbys_status: bits8,
pub walsnds: __IncompleteArrayField<WalSnd>,
}
impl Default for WalSndCtlData {
fn default() -> Self {
let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
unsafe {
::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RowSecurityPolicy {
pub policy_name: *mut ::core::ffi::c_char,
Expand Down Expand Up @@ -31422,6 +31509,7 @@ unsafe extern "C-unwind" {
pub fn standard_ExecutorEnd(queryDesc: *mut QueryDesc);
pub fn ExecutorRewind(queryDesc: *mut QueryDesc);
pub fn ExecCheckRTPerms(rangeTable: *mut List, ereport_on_violation: bool) -> bool;
pub fn ExecCheckRTEPerms(rte: *mut RangeTblEntry) -> bool;
pub fn CheckValidResultRel(resultRelInfo: *mut ResultRelInfo, operation: CmdType::Type);
pub fn InitResultRelInfo(
resultRelInfo: *mut ResultRelInfo,
Expand Down Expand Up @@ -38738,6 +38826,7 @@ unsafe extern "C-unwind" {
);
pub fn get_function_rows(root: *mut PlannerInfo, funcid: Oid, node: *mut Node) -> f64;
pub fn has_row_triggers(root: *mut PlannerInfo, rti: Index, event: CmdType::Type) -> bool;
pub fn has_transition_tables(root: *mut PlannerInfo, rti: Index, event: CmdType::Type) -> bool;
pub fn has_stored_generated_columns(root: *mut PlannerInfo, rti: Index) -> bool;
pub fn get_dependent_generated_columns(
root: *mut PlannerInfo,
Expand Down Expand Up @@ -39969,6 +40058,13 @@ unsafe extern "C-unwind" {
nmsgs: Size,
msgs: *mut SharedInvalidationMessage,
);
pub fn ReorderBufferAddDistributedInvalidations(
rb: *mut ReorderBuffer,
xid: TransactionId,
lsn: XLogRecPtr,
nmsgs: Size,
msgs: *mut SharedInvalidationMessage,
);
pub fn ReorderBufferImmediateInvalidation(
arg1: *mut ReorderBuffer,
ninvalidations: uint32,
Expand Down Expand Up @@ -40064,6 +40160,43 @@ unsafe extern "C-unwind" {
) -> bool;
pub fn ApplyWorkerMain(main_arg: Datum);
pub fn IsLogicalWorker() -> bool;
pub static mut SyncRepConfig: *mut SyncRepConfigData;
pub static mut syncrep_parse_result: *mut SyncRepConfigData;
pub static mut syncrep_parse_error_msg: *mut ::core::ffi::c_char;
pub static mut SyncRepStandbyNames: *mut ::core::ffi::c_char;
pub fn SyncRepWaitForLSN(lsn: XLogRecPtr, commit: bool);
pub fn SyncRepCleanupAtProcExit();
pub fn SyncRepInitConfig();
pub fn SyncRepReleaseWaiters();
pub fn SyncRepGetCandidateStandbys(
standbys: *mut *mut SyncRepStandbyData,
) -> ::core::ffi::c_int;
pub fn SyncRepUpdateSyncStandbysDefined();
pub fn check_synchronous_standby_names(
newval: *mut *mut ::core::ffi::c_char,
extra: *mut *mut ::core::ffi::c_void,
source: GucSource::Type,
) -> bool;
pub fn assign_synchronous_standby_names(
newval: *const ::core::ffi::c_char,
extra: *mut ::core::ffi::c_void,
);
pub fn assign_synchronous_commit(newval: ::core::ffi::c_int, extra: *mut ::core::ffi::c_void);
pub fn syncrep_yyparse() -> ::core::ffi::c_int;
pub fn syncrep_yylex() -> ::core::ffi::c_int;
pub fn syncrep_yyerror(str_: *const ::core::ffi::c_char);
pub fn syncrep_scanner_init(query_string: *const ::core::ffi::c_char);
pub fn syncrep_scanner_finish();
pub static mut MyWalSnd: *mut WalSnd;
pub static mut WalSndCtl: *mut WalSndCtlData;
pub fn WalSndSetState(state: WalSndState::Type);
pub fn replication_yyparse() -> ::core::ffi::c_int;
pub fn replication_yylex() -> ::core::ffi::c_int;
pub fn replication_yyerror(str_: *const ::core::ffi::c_char) -> !;
pub fn replication_scanner_init(query_string: *const ::core::ffi::c_char);
pub fn replication_scanner_finish();
pub fn replication_scanner_is_replication_command() -> bool;
pub static mut replication_parse_result: *mut Node;
pub fn QueryRewrite(parsetree: *mut Query) -> *mut List;
pub fn AcquireRewriteLocks(parsetree: *mut Query, forExecute: bool, forUpdatePushedDown: bool);
pub fn build_column_default(rel: Relation, attrno: ::core::ffi::c_int) -> *mut Node;
Expand Down Expand Up @@ -43956,6 +44089,11 @@ unsafe extern "C-unwind" {
varRelid: ::core::ffi::c_int,
vardata: *mut VariableStatData,
);
pub fn all_rows_selectable(
root: *mut PlannerInfo,
varno: Index,
varattnos: *mut Bitmapset,
) -> bool;
pub fn statistic_proc_security_check(vardata: *mut VariableStatData, func_oid: Oid) -> bool;
pub fn get_restriction_variable(
root: *mut PlannerInfo,
Expand Down Expand Up @@ -48528,6 +48666,16 @@ pub const WalLevel_WAL_LEVEL_MINIMAL: u32 = 0;
pub const WalLevel_WAL_LEVEL_REPLICA: u32 = 1;
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalLevel::WAL_LEVEL_LOGICAL")]
pub const WalLevel_WAL_LEVEL_LOGICAL: u32 = 2;
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_STARTUP")]
pub const WalSndState_WALSNDSTATE_STARTUP: u32 = 0;
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_BACKUP")]
pub const WalSndState_WALSNDSTATE_BACKUP: u32 = 1;
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_CATCHUP")]
pub const WalSndState_WALSNDSTATE_CATCHUP: u32 = 2;
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_STREAMING")]
pub const WalSndState_WALSNDSTATE_STREAMING: u32 = 3;
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_STOPPING")]
pub const WalSndState_WALSNDSTATE_STOPPING: u32 = 4;
#[deprecated(since = "0.12.0", note = "you want pg_sys::XLTW_Oper::XLTW_None")]
pub const XLTW_Oper_XLTW_None: u32 = 0;
#[deprecated(since = "0.12.0", note = "you want pg_sys::XLTW_Oper::XLTW_Update")]
Expand Down
Loading
Loading