diff --git a/Cargo.lock b/Cargo.lock index d4d6114a..f206251d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,16 +154,16 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.68.1" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ "bitflags 2.4.0", "cexpr", "clang-sys", + "itertools", "lazy_static", "lazycell", - "peeking_take_while", "proc-macro2", "quote", "regex", @@ -976,6 +976,12 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "is_ci" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" + [[package]] name = "itertools" version = "0.10.5" @@ -1014,9 +1020,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" @@ -1255,6 +1261,9 @@ name = "owo-colors" version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +dependencies = [ + "supports-color", +] [[package]] name = "parking_lot" @@ -1295,12 +1304,6 @@ dependencies = [ "libc", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "percent-encoding" version = "2.3.0" @@ -1363,9 +1366,9 @@ dependencies = [ [[package]] name = "pgrx" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde2cf81d16772f2e75c91edd2e868de1bd67a79d6c45c3d25c62b2ed3851d70" +checksum = "3d4af45e16c27d0c7c12665f0cc5a714258c581a39901ee1488edd79a3c4c5a5" dependencies = [ "atomic-traits", "bitflags 2.4.0", @@ -1388,9 +1391,9 @@ dependencies = [ [[package]] name = "pgrx-macros" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9c035c16a41b126f8c2b37307f2c717b5ee72ff8e7495ff502ad35471a0b38" +checksum = "3a8e65ea4e93a273f42bc2ca024d2c65379541f223157f136db4b7d436088027" dependencies = [ "pgrx-sql-entity-graph", "proc-macro2", @@ -1400,9 +1403,9 @@ dependencies = [ [[package]] name = "pgrx-pg-config" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f9d9b6310ea9f13570d773d173bbcfe47ac844075bf6a3e207e7209786c631" +checksum = "93074d31fc2f47c74ab46920fffa9ed9fb704fc8ffc07f8331c1e3b38e7ef88b" dependencies = [ "cargo_toml", "dirs", @@ -1418,11 +1421,12 @@ dependencies = [ [[package]] name = "pgrx-pg-sys" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f821614646963302a8499b8ac8332cc0e2ae3f8715a0220986984443d8880f74" +checksum = "9a3f58b876cd9745609217c891978dd19023c9ccbfaa011c1a5af7f720e1c3fb" dependencies = [ "bindgen", + "clang-sys", "eyre", "libc", "memoffset", @@ -1436,13 +1440,14 @@ dependencies = [ "shlex", "sptr", "syn 1.0.109", + "walkdir", ] [[package]] name = "pgrx-sql-entity-graph" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4743b5b23fd418cded0c2dbe4b1529628f7fa59b8d68426eafdde0cb51541c96" +checksum = "3db12a1066a0ebecb8bae7aacf5b41f8e1c27c18ed914ee2a35fc2a974cd08e3" dependencies = [ "convert_case", "eyre", @@ -1455,9 +1460,9 @@ dependencies = [ [[package]] name = "pgrx-tests" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177bb8f6811bd65180c5a24a33666baed0ed5c08cc584c4bdb78f7fe19304363" +checksum = "0e28115c05db260b63e3cde7e02de861b954dae19124261650f9c60b4667e8d4" dependencies = [ "clap-cargo", "eyre", @@ -1570,9 +1575,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1591,7 +1596,7 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax", + "regex-syntax 0.7.5", "rusty-fork", "tempfile", "unarray", @@ -1758,25 +1763,25 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.6" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax", + "regex-syntax 0.8.4", ] [[package]] name = "regex-automata" -version = "0.3.9" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.4", ] [[package]] @@ -1785,6 +1790,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + [[package]] name = "ron" version = "0.6.6" @@ -1965,9 +1976,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -1996,9 +2007,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "simba" @@ -2137,6 +2148,16 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "supports-color" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ba6faf2ca7ee42fdd458f4347ae0a9bd6bcc445ad7cb57ad82b383f18870d6f" +dependencies = [ + "atty", + "is_ci", +] + [[package]] name = "syn" version = "1.0.109" @@ -2410,21 +2431,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.1" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc1433177506450fe920e46a4f9812d0c211f5dd556da10e731a0a3dfa151f0" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.1", + "toml_edit 0.22.14", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] @@ -2442,9 +2463,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.1" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca676d9ba1a322c1b64eb8045a5ec5c0cfb0c9d08e15e9ff622589ad5221c8fe" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ "indexmap 2.0.2", "serde", @@ -2871,9 +2892,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.15" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] diff --git a/Readme.md b/Readme.md index 8399b70d..7bc411c4 100644 --- a/Readme.md +++ b/Readme.md @@ -51,7 +51,7 @@ sudo apt-get install make gcc pkg-config clang postgresql-server-dev-14 libssl-d Next you need [cargo-pgrx](https://github.com/tcdi/pgrx), which can be installed with ```bash -cargo install --version '=0.10.2' --force cargo-pgrx +cargo install --version '=0.11.4' --force cargo-pgrx ``` You must reinstall cargo-pgrx whenever you update your Rust compiler, since cargo-pgrx needs to be built with the same compiler as Toolkit. diff --git a/extension/Cargo.toml b/extension/Cargo.toml index d6e50888..6266462f 100644 --- a/extension/Cargo.toml +++ b/extension/Cargo.toml @@ -18,9 +18,9 @@ pg_test = ["approx"] [dependencies] # Keep synchronized with `cargo install --version N.N.N cargo-pgrx` in Readme.md and docker/ci/Dockerfile # Also `pgrx-tests` down below in `dev-dependencies`. -pgrx = "=0.10.2" -pgrx-macros = "=0.10.2" -pgrx-sql-entity-graph = "=0.10.2" +pgrx = "=0.11.4" +pgrx-macros = "=0.11.4" +pgrx-sql-entity-graph = "=0.11.4" encodings = {path="../crates/encodings"} flat_serialize = {path="../crates/flat_serialize/flat_serialize"} flat_serialize_macro = {path="../crates/flat_serialize/flat_serialize_macro"} @@ -57,5 +57,5 @@ spfunc = "0.1.0" statrs = "0.15.0" [dev-dependencies] -pgrx-tests = "=0.10.2" +pgrx-tests = "=0.11.4" approx = "0.4.0" diff --git a/extension/src/frequency.rs b/extension/src/frequency.rs index 16439f19..7089ee64 100644 --- a/extension/src/frequency.rs +++ b/extension/src/frequency.rs @@ -454,7 +454,7 @@ impl<'input> From<&SpaceSavingTransState> for SpaceSavingAggregate<'input> { } impl<'input> From<(&SpaceSavingAggregate<'input>, &pg_sys::FunctionCallInfo)> - for SpaceSavingTransState +for SpaceSavingTransState { fn from(data_in: (&SpaceSavingAggregate<'input>, &pg_sys::FunctionCallInfo)) -> Self { let (agg, fcinfo) = data_in; @@ -462,14 +462,14 @@ impl<'input> From<(&SpaceSavingAggregate<'input>, &pg_sys::FunctionCallInfo)> let mut trans = if agg.topn == 0 { SpaceSavingTransState::freq_agg_from_type_id( agg.freq_param, - unsafe { Oid::from_u32_unchecked(agg.type_oid) }, + pg_sys::Oid::from(agg.type_oid), collation, ) } else { SpaceSavingTransState::mcv_agg_from_type_id( agg.freq_param, agg.topn as u32, - unsafe { Oid::from_u32_unchecked(agg.type_oid) }, + pg_sys::Oid::from(agg.type_oid), collation, ) }; @@ -527,10 +527,10 @@ impl<'input> From<&SpaceSavingTransState> for SpaceSavingBigIntAggregate<'input> } impl<'input> - From<( - &SpaceSavingBigIntAggregate<'input>, - &pg_sys::FunctionCallInfo, - )> for SpaceSavingTransState +From<( + &SpaceSavingBigIntAggregate<'input>, + &pg_sys::FunctionCallInfo, +)> for SpaceSavingTransState { fn from( data_in: ( @@ -604,7 +604,7 @@ impl<'input> From<&SpaceSavingTransState> for SpaceSavingTextAggregate<'input> { } impl<'input> From<(&SpaceSavingTextAggregate<'input>, &pg_sys::FunctionCallInfo)> - for SpaceSavingTransState +for SpaceSavingTransState { fn from(data_in: (&SpaceSavingTextAggregate<'input>, &pg_sys::FunctionCallInfo)) -> Self { let (agg, fcinfo) = data_in; @@ -677,7 +677,7 @@ pub fn mcv_agg_with_skew_trans( SpaceSavingTransState::mcv_agg_from_type_id(skew, n as u32, typ, collation) }, ) - .internal() + .internal() } #[pg_extern(immutable, parallel_safe)] @@ -703,7 +703,7 @@ pub fn mcv_agg_with_skew_bigint_trans( SpaceSavingTransState::mcv_agg_from_type_id(skew, n as u32, typ, collation) }, ) - .internal() + .internal() } #[pg_extern(immutable, parallel_safe)] @@ -730,7 +730,7 @@ pub fn mcv_agg_with_skew_text_trans( SpaceSavingTransState::mcv_agg_from_type_id(skew, n as u32, typ, collation) }, ) - .internal() + .internal() } #[pg_extern(schema = "toolkit_experimental", immutable, parallel_safe)] @@ -750,7 +750,7 @@ pub fn freq_agg_trans( fcinfo, |typ, collation| SpaceSavingTransState::freq_agg_from_type_id(freq, typ, collation), ) - .internal() + .internal() } #[pg_extern(schema = "toolkit_experimental", immutable, parallel_safe)] @@ -1279,9 +1279,9 @@ pub fn freq_iter<'a>( let value = AnyElement::from_polymorphic_datum( value, false, - Oid::from_u32_unchecked(agg.type_oid), + pg_sys::Oid::from(agg.type_oid), ) - .unwrap(); + .unwrap(); let min_freq = (count - overcount) as f64 / total; let max_freq = count as f64 / total; Some((value, min_freq, max_freq)) @@ -1372,7 +1372,7 @@ fn validate_topn_for_mcv_agg( topn: u32, skew: f64, total_vals: u64, - counts: impl Iterator, + counts: impl Iterator, ) { if topn == 0 { // Not a mcv aggregate @@ -1425,10 +1425,10 @@ pub fn topn( n, min_freq, ) - // TODO Shouldn't failure to convert to AnyElement cause error, not early stop? - .map_while(move |value| unsafe { - AnyElement::from_polymorphic_datum(value, false, Oid::from_u32_unchecked(type_oid)) - }), + // TODO Shouldn't failure to convert to AnyElement cause error, not early stop? + .map_while(move |value| unsafe { + AnyElement::from_polymorphic_datum(value, false, pg_sys::Oid::from(type_oid)) + }), ) } @@ -1510,7 +1510,7 @@ pub fn topn_text(agg: SpaceSavingTextAggregate<'_>, n: i32) -> SetOfIterator, value: AnyElement) -> f64 { match agg .datums .iter() - .position(|datum| value == (datum, unsafe { Oid::from_u32_unchecked(agg.type_oid) }).into()) + .position(|datum| value == (datum, pg_sys::Oid::from(agg.type_oid),).into()) { Some(idx) => agg.counts.slice()[idx] as f64 / agg.values_seen as f64, None => 0., @@ -1560,7 +1560,7 @@ pub fn min_frequency(agg: SpaceSavingAggregate<'_>, value: AnyElement) -> f64 { match agg .datums .iter() - .position(|datum| value == (datum, unsafe { Oid::from_u32_unchecked(agg.type_oid) }).into()) + .position(|datum| value == (datum, pg_sys::Oid::from(agg.type_oid),).into()) { Some(idx) => { (agg.counts.slice()[idx] - agg.overcounts.slice()[idx]) as f64 / agg.values_seen as f64 @@ -1635,7 +1635,7 @@ pub fn min_text_frequency(agg: SpaceSavingTextAggregate<'_>, value: text) -> f64 } } -struct TopNIterator> { +struct TopNIterator> { datums_iter: InputIterator, counts_iter: std::vec::IntoIter, values_seen: f64, @@ -1644,7 +1644,7 @@ struct TopNIterator> { i: u32, } -impl> TopNIterator { +impl> TopNIterator { fn new( datums_iter: InputIterator, counts: Vec, @@ -1663,8 +1663,8 @@ impl> TopNIterator> Iterator - for TopNIterator +impl> Iterator +for TopNIterator { type Item = Input; fn next(&mut self) -> Option { @@ -1943,7 +1943,7 @@ mod tests { super::space_saving_deserialize(second, None.into()).unwrap(), fcinfo, ) - .unwrap(), + .unwrap(), ); let bytes = unsafe { @@ -2241,44 +2241,44 @@ mod tests { // simple tests let (min, max) = client.update("SELECT min_frequency(agg, 3), max_frequency(agg, 3) FROM aggs WHERE name = 'freq_2'", None, None) .unwrap().first() - .get_two::().unwrap(); + .get_two::().unwrap(); assert_eq!(min.unwrap(), 0.01904761904761905); assert_eq!(max.unwrap(), 0.01904761904761905); let (min, max) = client.update("SELECT min_frequency(agg, 11), max_frequency(agg, 11) FROM aggs WHERE name = 'mcv_default'", None, None) .unwrap().first() - .get_two::().unwrap(); + .get_two::().unwrap(); assert_eq!(min.unwrap(), 0.05714285714285714); assert_eq!(max.unwrap(), 0.05714285714285714); let (min, max) = client.update("SELECT agg -> min_frequency(3), agg -> max_frequency(3) FROM aggs WHERE name = 'freq_2'", None, None) .unwrap().first() - .get_two::().unwrap(); + .get_two::().unwrap(); assert_eq!(min.unwrap(), 0.01904761904761905); assert_eq!(max.unwrap(), 0.01904761904761905); let (min, max) = client.update("SELECT agg -> min_frequency(11), agg -> max_frequency(11) FROM aggs WHERE name = 'mcv_default'", None, None) .unwrap().first() - .get_two::().unwrap(); + .get_two::().unwrap(); assert_eq!(min.unwrap(), 0.05714285714285714); assert_eq!(max.unwrap(), 0.05714285714285714); // missing value let (min, max) = client.update("SELECT min_frequency(agg, 3), max_frequency(agg, 3) FROM aggs WHERE name = 'freq_8'", None, None) .unwrap().first() - .get_two::().unwrap(); + .get_two::().unwrap(); assert_eq!(min.unwrap(), 0.); assert_eq!(max.unwrap(), 0.); let (min, max) = client.update("SELECT min_frequency(agg, 20), max_frequency(agg, 20) FROM aggs WHERE name = 'mcv_2'", None, None) .unwrap().first() - .get_two::().unwrap(); + .get_two::().unwrap(); assert_eq!(min.unwrap(), 0.); assert_eq!(max.unwrap(), 0.); // noisy value let (min, max) = client.update("SELECT min_frequency(agg, 8), max_frequency(agg, 8) FROM aggs WHERE name = 'mcv_1.5'", None, None) .unwrap().first() - .get_two::().unwrap(); + .get_two::().unwrap(); assert_eq!(min.unwrap(), 0.004761904761904762); assert_eq!(max.unwrap(), 0.05238095238095238); }); @@ -2323,7 +2323,7 @@ mod tests { let mut result = client.update( "WITH aggs AS (SELECT bucket, raw_mcv_agg(5, raw_data) as raw_agg FROM test GROUP BY bucket) SELECT topn(rollup(raw_agg), NULL::DOUBLE PRECISION)::TEXT from aggs", - None, None + None, None, ).unwrap(); assert_eq!(result.next().unwrap()[1].value().unwrap(), Some("1")); assert_eq!(result.next().unwrap()[1].value().unwrap(), Some("2")); @@ -2335,7 +2335,7 @@ mod tests { let mut result = client.update( "WITH aggs AS (SELECT bucket, mcv_agg(5, int_data) as int_agg FROM test GROUP BY bucket) SELECT topn(rollup(int_agg))::TEXT from aggs", - None, None + None, None, ).unwrap(); assert_eq!(result.next().unwrap()[1].value().unwrap(), Some("1")); assert_eq!(result.next().unwrap()[1].value().unwrap(), Some("2")); @@ -2347,7 +2347,7 @@ mod tests { let mut result = client.update( "WITH aggs AS (SELECT bucket, mcv_agg(5, text_data) as text_agg FROM test GROUP BY bucket) SELECT topn(rollup(text_agg))::TEXT from aggs", - None, None + None, None, ).unwrap(); assert_eq!(result.next().unwrap()[1].value().unwrap(), Some("1")); assert_eq!(result.next().unwrap()[1].value().unwrap(), Some("2")); diff --git a/extension/src/time_vector/pipeline.rs b/extension/src/time_vector/pipeline.rs index a81666ae..abd3bd2b 100644 --- a/extension/src/time_vector/pipeline.rs +++ b/extension/src/time_vector/pipeline.rs @@ -186,7 +186,7 @@ pub(crate) unsafe fn pipeline_support_helper( let input = input.unwrap().unwrap(); let input: *mut pg_sys::Node = input.cast_mut_ptr(); - if !pgrx::is_a(input, pg_sys::NodeTag_T_SupportRequestSimplify) { + if !pgrx::is_a(input, pg_sys::NodeTag::T_SupportRequestSimplify) { return no_change(); } @@ -198,10 +198,10 @@ pub(crate) unsafe fn pipeline_support_helper( let arg1 = original_args.head().unwrap(); let arg2 = original_args.tail().unwrap(); - let (executor_id, lhs_args) = if is_a(arg1, pg_sys::NodeTag_T_OpExpr) { + let (executor_id, lhs_args) = if is_a(arg1, pg_sys::NodeTag::T_OpExpr) { let old_executor: *mut pg_sys::OpExpr = arg1.cast(); ((*old_executor).opfuncid, (*old_executor).args) - } else if is_a(arg1, pg_sys::NodeTag_T_FuncExpr) { + } else if is_a(arg1, pg_sys::NodeTag::T_FuncExpr) { let old_executor: *mut pg_sys::FuncExpr = arg1.cast(); ((*old_executor).funcid, (*old_executor).args) } else { @@ -244,13 +244,13 @@ pub(crate) unsafe fn pipeline_support_helper( let old_series = lhs_args.head().unwrap(); let old_const = lhs_args.tail().unwrap(); - if !is_a(old_const, pg_sys::NodeTag_T_Const) { + if !is_a(old_const, pg_sys::NodeTag::T_Const) { return no_change(); } let old_const: *mut pg_sys::Const = old_const.cast(); - if !is_a(arg2, pg_sys::NodeTag_T_Const) { + if !is_a(arg2, pg_sys::NodeTag::T_Const) { return no_change(); } diff --git a/tools/dependencies.sh b/tools/dependencies.sh index 98fe986c..f2144a5d 100644 --- a/tools/dependencies.sh +++ b/tools/dependencies.sh @@ -14,7 +14,7 @@ TSDB_PG_VERSIONS='12 13 14 15' CARGO_EDIT=0.11.2 # Keep synchronized with extension/Cargo.toml and `cargo install --version N.N.N cargo-pgrx` in Readme.md . -PGRX_VERSION=0.10.2 +PGRX_VERSION=0.11.4 RUST_TOOLCHAIN=1.70.0 RUST_PROFILE=minimal