diff --git a/Cargo.lock b/Cargo.lock index eea657f..dcd5dc7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -132,11 +132,11 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.60.1" +version = "0.66.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" +checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" dependencies = [ - "bitflags", + "bitflags 2.3.3", "cexpr", "clang-sys", "lazy_static", @@ -147,6 +147,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", + "syn 2.0.16", ] [[package]] @@ -170,6 +171,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "bitvec" version = "1.0.1" @@ -209,6 +216,16 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +[[package]] +name = "cargo_toml" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" +dependencies = [ + "serde", + "toml", +] + [[package]] name = "cc" version = "1.0.79" @@ -240,7 +257,7 @@ dependencies = [ "js-sys", "num-integer", "num-traits", - "time 0.1.45", + "time", "wasm-bindgen", "winapi", ] @@ -284,7 +301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd" dependencies = [ "anstyle", - "bitflags", + "bitflags 1.3.2", "clap_lex", ] @@ -375,7 +392,7 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset", + "memoffset 0.8.0", "scopeguard", ] @@ -450,22 +467,23 @@ dependencies = [ [[package]] name = "dirs" -version = "4.0.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -480,6 +498,32 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +[[package]] +name = "enum-map" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "017b207acb4cc917f4c31758ed95c0bc63ddb0f358b22eb38f80a2b2a43f6b1f" +dependencies = [ + "enum-map-derive", +] + +[[package]] +name = "enum-map-derive" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8560b409800a72d2d7860f8e5f4e0b0bd22bea6a352ea2a9ce30ccdef7f16d2f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "equivalent" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" + [[package]] name = "errno" version = "0.3.1" @@ -562,13 +606,19 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] +[[package]] +name = "fstr" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f03a044702089b29cbac16d07a20a787334e430c206d97e028e2c9e384b49e13" + [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -658,9 +708,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "glob" @@ -689,6 +739,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "heapless" version = "0.7.16" @@ -768,9 +824,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -789,7 +845,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] @@ -814,9 +880,9 @@ dependencies = [ [[package]] name = "ipnetwork" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4088d739b183546b239688ddbc79891831df421773df95e236daf7867866d355" +checksum = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e" dependencies = [ "serde", ] @@ -854,7 +920,7 @@ dependencies = [ "byteorder", "rand 0.3.23", "resize-slice", - "time 0.1.45", + "time", ] [[package]] @@ -871,9 +937,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libloading" @@ -952,6 +1018,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -988,6 +1063,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + [[package]] name = "nom" version = "7.1.3" @@ -1096,18 +1177,24 @@ dependencies = [ [[package]] name = "object" -version = "0.30.3" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "owo-colors" @@ -1156,9 +1243,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" @@ -1177,7 +1264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.3", ] [[package]] @@ -1188,8 +1275,8 @@ dependencies = [ "getrandom", "ksuid", "nanoid", - "pgx", - "pgx-tests", + "pgrx", + "pgrx-tests", "pushid", "sonyflake", "timeflake-rs", @@ -1199,50 +1286,49 @@ dependencies = [ ] [[package]] -name = "pgx" -version = "0.7.4" +name = "pgrx" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2947326bd9a80ec122207f0a59367592f79c053390d6ee961fe17a71ef1e3d" +checksum = "6186d4aa5911be4c00b52e555779deece35a7563c87fcfe794407dc2e9cc4dc1" dependencies = [ "atomic-traits", - "bitflags", + "bitflags 2.3.3", "bitvec", + "enum-map", "heapless", "libc", "once_cell", - "pgx-macros", - "pgx-pg-sys", - "pgx-sql-entity-graph", + "pgrx-macros", + "pgrx-pg-sys", + "pgrx-sql-entity-graph", "seahash", "seq-macro", "serde", "serde_cbor", "serde_json", "thiserror", - "time 0.3.21", - "tracing", - "tracing-error", "uuid", ] [[package]] -name = "pgx-macros" -version = "0.7.4" +name = "pgrx-macros" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bf5c70a467b39c1a67a2e1ec7acc4ba8bb32e5bf2d3dead2d89b8442f31ff9" +checksum = "479a66a8c582e0fdf101178473315cb13eaa10829c154db742c35ec0279cdaec" dependencies = [ - "pgx-sql-entity-graph", + "pgrx-sql-entity-graph", "proc-macro2", "quote", "syn 1.0.109", ] [[package]] -name = "pgx-pg-config" -version = "0.7.4" +name = "pgrx-pg-config" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020f2f1e0805a60321a375d0f27d771678d59b808bbb5f632c42607a661ab63a" +checksum = "1e45c557631217a13859e223899c01d35982ef0c860ee5ab65af496f830b1316" dependencies = [ + "cargo_toml", "dirs", "eyre", "owo-colors", @@ -1255,19 +1341,19 @@ dependencies = [ ] [[package]] -name = "pgx-pg-sys" -version = "0.7.4" +name = "pgrx-pg-sys" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2371dc1ee5c6f32b9a862fe1706e7ddf862003f167d21d9886b4b4f3f2391e" +checksum = "0dde896a17c638b6475d6fc12b571a176013a8486437bbc8a64ac2afb8ba5d58" dependencies = [ "bindgen", "eyre", "libc", - "memoffset", + "memoffset 0.9.0", "once_cell", - "pgx-macros", - "pgx-pg-config", - "pgx-sql-entity-graph", + "pgrx-macros", + "pgrx-pg-config", + "pgrx-sql-entity-graph", "proc-macro2", "quote", "serde", @@ -1277,10 +1363,10 @@ dependencies = [ ] [[package]] -name = "pgx-sql-entity-graph" -version = "0.7.4" +name = "pgrx-sql-entity-graph" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5b7304665fe3a052dd353a08d013c4d5d780a49be8b60d27c430492b1d442e" +checksum = "b1e9abc71b018d90aa9b7a34fedf48b76da5d55c04d2ed2288096827bebbf403" dependencies = [ "convert_case", "eyre", @@ -1292,26 +1378,25 @@ dependencies = [ ] [[package]] -name = "pgx-tests" -version = "0.7.4" +name = "pgrx-tests" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2dfa440a295e0a6bc1a7c87af83dc5e9f7a85c05d28b9fa77f1793f6883f917" +checksum = "39ac4ffedfa247f9d51421e4e2ac18c33d8d674350bad730f3fe5736bf298612" dependencies = [ "clap-cargo", "eyre", "libc", "once_cell", "owo-colors", - "pgx", - "pgx-macros", - "pgx-pg-config", + "pgrx", + "pgrx-macros", + "pgrx-pg-config", "postgres", "regex", "serde", "serde_json", "sysinfo", "thiserror", - "time 0.3.21", ] [[package]] @@ -1346,9 +1431,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pnet" -version = "0.28.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6d2a0409666964722368ef5fb74b9f93fac11c18bef3308693c16c6733f103" +checksum = "cd959a8268165518e2bf5546ba84c7b3222744435616381df3c456fe8d983576" dependencies = [ "ipnetwork", "pnet_base", @@ -1360,15 +1445,18 @@ dependencies = [ [[package]] name = "pnet_base" -version = "0.28.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25488cd551a753dcaaa6fffc9f69a7610a412dd8954425bf7ffad5f7d1156fb8" +checksum = "872e46346144ebf35219ccaa64b1dffacd9c6f188cd7d012bd6977a2a838f42e" +dependencies = [ + "no-std-net", +] [[package]] name = "pnet_datalink" -version = "0.28.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d1f8ab1ef6c914cf51dc5dfe0be64088ea5f3b08bbf5a31abc70356d271198" +checksum = "c302da22118d2793c312a35fb3da6846cb0fab6c3ad53fd67e37809b06cdafce" dependencies = [ "ipnetwork", "libc", @@ -1379,9 +1467,9 @@ dependencies = [ [[package]] name = "pnet_macros" -version = "0.28.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30490e0852e58402b8fae0d39897b08a24f493023a4d6cf56b2e30f31ed57548" +checksum = "2a780e80005c2e463ec25a6e9f928630049a10b43945fea83207207d4a7606f4" dependencies = [ "proc-macro2", "quote", @@ -1391,18 +1479,18 @@ dependencies = [ [[package]] name = "pnet_macros_support" -version = "0.28.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4714e10f30cab023005adce048f2d30dd4ac4f093662abf2220855655ef8f90" +checksum = "e6d932134f32efd7834eb8b16d42418dac87086347d1bc7d142370ef078582bc" dependencies = [ "pnet_base", ] [[package]] name = "pnet_packet" -version = "0.28.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8588067671d03c9f4254b2e66fecb4d8b93b5d3e703195b84f311cd137e32130" +checksum = "8bde678bbd85cb1c2d99dc9fc596e57f03aa725f84f3168b0eaf33eeccb41706" dependencies = [ "glob", "pnet_base", @@ -1412,9 +1500,9 @@ dependencies = [ [[package]] name = "pnet_sys" -version = "0.28.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a3f32b0df45515befd19eed04616f6b56a488da92afc61164ef455e955f07f" +checksum = "faf7a58b2803d818a374be9278a1fe8f88fce14b936afbe225000cfcd9c73f16" dependencies = [ "libc", "winapi", @@ -1422,9 +1510,9 @@ dependencies = [ [[package]] name = "pnet_transport" -version = "0.28.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "932b2916d693bcc5fa18443dc99142e0a6fd31a6ce75a511868f7174c17e2bce" +checksum = "813d1c0e4defbe7ee22f6fe1755f122b77bfb5abe77145b1b5baaf463cab9249" dependencies = [ "libc", "pnet_base", @@ -1483,9 +1571,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" dependencies = [ "unicode-ident", ] @@ -1497,7 +1585,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "num-traits", @@ -1534,9 +1622,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.27" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2", ] @@ -1661,7 +1749,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1670,7 +1758,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1686,13 +1774,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.1" +version = "1.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.1", + "regex-syntax 0.7.2", ] [[package]] @@ -1703,9 +1791,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "resize-slice" @@ -1752,7 +1840,7 @@ version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -1872,9 +1960,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -1900,15 +1988,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "sharded-slab" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" -dependencies = [ - "lazy_static", -] - [[package]] name = "shlex" version = "1.1.0" @@ -1958,9 +2037,9 @@ dependencies = [ [[package]] name = "sonyflake" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4102d86f8bb570997c0de84e159428f76add1240790e67cfcc85213e7891e781" +checksum = "dd887737d30ba9b1a2c1e1d5c86934c043ad7281d019f0b07902621e268cbbb0" dependencies = [ "chrono", "pnet", @@ -2044,7 +2123,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225e483f02d0ad107168dc57381a8a40c3aeea6abe47f37506931f861643cfa8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "byteorder", "libc", "thiserror", @@ -2053,9 +2132,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.28.4" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2f3ca6693feb29a89724516f016488e9aafc7f37264f898593ee4b942f31b" +checksum = "5bcd0346f90b6bc83526c7b180039a8acd26a5c848cc556d457f6472eb148122" dependencies = [ "cfg-if", "core-foundation-sys", @@ -2105,16 +2184,6 @@ dependencies = [ "syn 2.0.16", ] -[[package]] -name = "thread_local" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" -dependencies = [ - "cfg-if", - "once_cell", -] - [[package]] name = "time" version = "0.1.45" @@ -2126,38 +2195,11 @@ dependencies = [ "winapi", ] -[[package]] -name = "time" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" -dependencies = [ - "itoa", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" - -[[package]] -name = "time-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" -dependencies = [ - "time-core", -] - [[package]] name = "timeflake-rs" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee916087ce018557dc49fdd6c775fea58abbb84767e50d7c28bde8e867df7f5" +checksum = "cb6fd80862ab15d2f3efe2daacfdb0f07aded779698d6fd83610ed0e6ff0748e" dependencies = [ "custom_error", "rand 0.8.5", @@ -2234,9 +2276,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240" dependencies = [ "serde", "serde_spanned", @@ -2246,20 +2288,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.9" +version = "0.19.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d964908cec0d030b812013af25a0e57fddfadb1e066ecc6681d86253129d4f" +checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -2274,21 +2316,9 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "pin-project-lite", - "tracing-attributes", "tracing-core", ] -[[package]] -name = "tracing-attributes" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.16", -] - [[package]] name = "tracing-core" version = "0.1.31" @@ -2298,27 +2328,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tracing-error" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" -dependencies = [ - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" -dependencies = [ - "sharded-slab", - "thread_local", - "tracing-core", -] - [[package]] name = "typenum" version = "1.16.0" @@ -2333,12 +2342,11 @@ checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "ulid" -version = "0.6.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be932d774bfad49722da2c4915ac7cc77b77dd223890739a0240de2b2a15957" +checksum = "13a3aaa69b04e5b66cc27309710a569ea23593612387d67daaf102e73aa974fd" dependencies = [ "rand 0.8.5", - "time 0.3.21", ] [[package]] @@ -2394,9 +2402,9 @@ checksum = "74c1aa4511c38276c548406f0b1f5f8b793f000cfb51e18f278a102abd057e81" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -2405,19 +2413,20 @@ dependencies = [ [[package]] name = "uuid" -version = "1.3.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" dependencies = [ "getrandom", ] [[package]] name = "uuid7" -version = "0.2.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8cf1853132cf7f98f70affdaaa99908cd35f06b95abd3188e7ef6c1b698cd1" +checksum = "52e90e1dc12751e7a351ef15f5170a70ae1c57151ca3da854ac8a0b5181cdf5f" dependencies = [ + "fstr", "rand 0.8.5", ] diff --git a/Cargo.toml b/Cargo.toml index 00317b4..f11bcad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,29 @@ rust-version = "1.69.0" crate-type = ["cdylib"] [features] -default = [ "pg14" ] -pg11 = [ "pgx/pg11", "pgx-tests/pg11" ] -pg12 = [ "pgx/pg12", "pgx-tests/pg12" ] -pg13 = [ "pgx/pg13", "pgx-tests/pg13" ] -pg14 = [ "pgx/pg14", "pgx-tests/pg14" ] +default = ["pg14"] +pg11 = [ "pgrx/pg11", "pgrx-tests/pg11" ] +pg12 = [ "pgrx/pg12", "pgrx-tests/pg12" ] +pg13 = [ "pgrx/pg13", "pgrx-tests/pg13" ] +pg14 = [ "pgrx/pg14", "pgrx-tests/pg14" ] +pg15 = [ "pgrx/pg15", "pgrx-tests/pg15" ] pg_test = [] [dependencies] -pgx = "0.7.4" -uuid7 = "0.2.6" -nanoid = "0.4.0" +cuid = "1.3.1" +getrandom = "0.2.8" ksuid = "0.2.0" -ulid = "0.6.0" -timeflake-rs = "0.2.2" -sonyflake = "0.1.2" +nanoid = "0.4.0" +pgrx = "=0.9.7" pushid = "0.0.1" -xid = "1.0.2" -cuid = "1.2.0" -getrandom = "0.2.8" +sonyflake = "0.2.0" +timeflake-rs = "0.3.0" +ulid = "1.0.0" +uuid7 = "0.6.4" +xid = "1.0.3" [dev-dependencies] -pgx-tests = "=0.7.4" +pgrx-tests = "=0.9.7" [profile.dev] panic = "unwind" diff --git a/Makefile b/Makefile index cdf4fbd..b059360 100644 --- a/Makefile +++ b/Makefile @@ -76,11 +76,11 @@ build-test-watch: check-tool-cargo check-tool-cargo-watch > $(CARGO_WATCH) -x "test $(CARGO_BUILD_FLAGS)" --watch src package: -> $(CARGO) pgx package +> $(CARGO) pgrx package test: > $(CARGO) test -> $(CARGO) pgx test +> $(CARGO) pgrx test ########## # Docker # diff --git a/README.md b/README.md index 659eaa6..7c5cf26 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ | [xid][xid] | `idkit_xid_generate` | [`xid`](https://crates.io/crates/xid) | XID | | [cuid][cuid] | `idkit_cuid_generate` | [`cuid`](https://crates.io/crates/cuid) | CUID | -This Postgres extension is made possible thanks to [`pgx`][pgx]. +This Postgres extension is made possible thanks to [`pgrx`][pgrx]. ## Prior Art @@ -58,7 +58,7 @@ Here's how to get started working on `pg_idkit` locally. To work on `pg_idkit`, you'll need the following: - [Rust][rust] toolchain ([`rustup`][rustup]) -- [`pgx`][pgx] and it's toolchain (the rust subcommand) +- [`pgrx`][pgrx] and it's toolchain (the rust subcommand) - (optional) [`git-crypt`][git-crypt] (for working with secrets) - (optional) [direnv][direnv] - (optional) [Docker][docker] @@ -80,11 +80,11 @@ export DOCKER_CONFIG=$(realpath secrets/docker) [direnv]: https://direnv.net -## Install `cargo-pgx` +## Install `cargo-pgrx` ```console -cargo install cargo-pgx@0.7.4 -cargo pgx init --pg14 download +cargo install cargo-pgrx@0.9.7 +cargo pgrx init ``` ## Building the project @@ -99,12 +99,12 @@ To run the build continuously for quicker local development (assuming you have ` make build-watch ``` -### `pgx` workflow +### `pgrx` workflow -Note that you can use the `pgx`-documented development flow as well (using `cargo pgx`) as well, for example: +Note that you can use the `pgrx`-documented development flow as well (using `cargo pgrx`) as well, for example: ```console -cargo pgx run pg14 +cargo pgrx run pg14 ``` ## Run tests @@ -153,7 +153,7 @@ To push up images that are used from continuous integration: 4. Observe the docker login credentials generated in this local repo directory (`secrets/docker/config.json`) 5. Run `make build-ci-image push-ci-image` -[pgx]: https://github.com/tcdi/pgx +[pgrx]: https://github.com/tcdi/pgrx [github-ai]: https://github.com/ai [rfc-4122-update]: https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04 [cargo-watch]: https://github.com/passcod/cargo-watch @@ -183,7 +183,6 @@ To push up images that are used from continuous integration: [e-elliott]: https://github.com/ericelliott [wiki-gregorian]: https://en.wikipedia.org/wiki/Gregorian_calendar [rust]: https://rust-lang.org -[pgx]: https://github.com/tcdi/pgx [pg-docs-operator-classes]: https://www.postgresql.org/docs/current/indexes-opclass.html [repo]: https://github.com/t3hmrman/pg_idkit [oryx-pro]: https://system76.com/laptops/oryx diff --git a/infra/docker/ci.Dockerfile b/infra/docker/ci.Dockerfile index 5e339a5..83ea03d 100644 --- a/infra/docker/ci.Dockerfile +++ b/infra/docker/ci.Dockerfile @@ -55,9 +55,9 @@ RUN chmod g+w -R /usr/local/cargo RUN chmod g+w -R /usr/local/build # Install development/build/testing deps -# NOTE: version of cargo-pgx must be handled speicfically -RUN su idkit -c "cargo install sccache cargo-cache cargo-pgx@0.7.4" +# NOTE: version of cargo-pgrx must be handled speicfically +RUN su idkit -c "cargo install sccache cargo-cache cargo-pgrx@0.9.7" -# Initialize pgx -# NOTE: pgx must be reinitialized if cargo-pgx changes -RUN su idkit -c "cargo pgx init --pg14 download" +# Initialize pgrx +# NOTE: pgrx must be reinitialized if cargo-pgrx changes +RUN su idkit -c "cargo pgrx init --pg14 download" diff --git a/src/cuid.rs b/src/cuid.rs index 6926a49..e25e52a 100644 --- a/src/cuid.rs +++ b/src/cuid.rs @@ -1,5 +1,5 @@ -use pgx::*; use cuid; +use pgrx::*; /// Generate a random cuid UUID #[pg_extern] @@ -23,7 +23,7 @@ fn idkit_cuid_generate_text() -> String { #[cfg(any(test, feature = "pg_test"))] #[pg_schema] mod tests { - use pgx::*; + use pgrx::*; /// Basic length test #[pg_test] diff --git a/src/ksuid.rs b/src/ksuid.rs index 35f527c..1ec6019 100644 --- a/src/ksuid.rs +++ b/src/ksuid.rs @@ -1,5 +1,5 @@ -use pgx::*; use ksuid::Ksuid; +use pgrx::*; /// Generate a random KSUID (HEX-encoded) #[pg_extern] @@ -20,7 +20,7 @@ fn idkit_ksuid_generate_text() -> String { #[cfg(any(test, feature = "pg_test"))] #[pg_schema] mod tests { - use pgx::*; + use pgrx::*; /// Basic length test #[pg_test] diff --git a/src/lib.rs b/src/lib.rs index d7c6c5f..de4eaf9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ mod pushid; mod xid; mod cuid; -use pgx::*; +use pgrx::pg_module_magic; pg_module_magic!(); diff --git a/src/nanoid.rs b/src/nanoid.rs index 98829a5..007fc9b 100644 --- a/src/nanoid.rs +++ b/src/nanoid.rs @@ -1,4 +1,4 @@ -use pgx::*; +use pgrx::*; use nanoid::nanoid; /// Generate a nanoid @@ -20,7 +20,7 @@ fn idkit_nanoid_generate_text() -> String { #[cfg(any(test, feature = "pg_test"))] #[pg_schema] mod tests { - use pgx::*; + use pgrx::*; #[pg_test] /// Basic length test diff --git a/src/pushid.rs b/src/pushid.rs index 1f410bb..6ba3df2 100644 --- a/src/pushid.rs +++ b/src/pushid.rs @@ -1,4 +1,4 @@ -use pgx::*; +use pgrx::*; use pushid::PushId; use pushid::PushIdGen; @@ -21,7 +21,7 @@ fn idkit_pushid_generate_text() -> String { #[cfg(any(test, feature = "pg_test"))] #[pg_schema] mod tests { - use pgx::*; + use pgrx::*; /// Basic length test #[pg_test] diff --git a/src/timeflake.rs b/src/timeflake.rs index 171f36c..537e221 100644 --- a/src/timeflake.rs +++ b/src/timeflake.rs @@ -1,4 +1,4 @@ -use pgx::*; +use pgrx::*; use timeflake_rs::Timeflake; /// Generate a random timeflake UUID @@ -26,7 +26,7 @@ fn idkit_timeflake_generate_text() -> String { #[cfg(any(test, feature = "pg_test"))] #[pg_schema] mod tests { - use pgx::*; + use pgrx::*; /// Basic length test #[pg_test] diff --git a/src/ulid.rs b/src/ulid.rs index c04a396..c308f22 100644 --- a/src/ulid.rs +++ b/src/ulid.rs @@ -1,4 +1,4 @@ -use pgx::*; +use pgrx::*; use ulid::Ulid; /// Generate a ULID @@ -20,7 +20,7 @@ fn idkit_ulid_generate_text() -> String { #[cfg(any(test, feature = "pg_test"))] #[pg_schema] mod tests { - use pgx::*; + use pgrx::*; /// Basic length test #[pg_test] diff --git a/src/uuid_v6.rs b/src/uuid_v6.rs index 7894dfe..cbca92d 100644 --- a/src/uuid_v6.rs +++ b/src/uuid_v6.rs @@ -1,4 +1,4 @@ -use pgx::*; +use pgrx::*; mod vendor; use vendor::{Node, UUIDv6}; @@ -18,12 +18,12 @@ fn idkit_uuidv6_generate_text() -> String { /// Generate a UUID v6, producing a Postgres uuid object #[pg_extern] -fn idkit_uuidv6_generate_uuid() -> pgx::Uuid { +fn idkit_uuidv6_generate_uuid() -> pgrx::Uuid { let node = Node::new(); // This depends on PR to rust-uuidv6 // see: https://github.com/jedisct1/rust-uuidv6/pull/1 - pgx::Uuid::from_slice(&UUIDv6::new(&node).create_bytes()) + pgrx::Uuid::from_slice(&UUIDv6::new(&node).create_bytes()) .unwrap_or_else(|e| error!("{}", format!("failed to generate/parse uuidv6: {}", e))) } @@ -34,7 +34,7 @@ fn idkit_uuidv6_generate_uuid() -> pgx::Uuid { #[cfg(any(test, feature = "pg_test"))] #[pg_schema] mod tests { - use pgx::*; + use pgrx::*; /// Basic length test #[pg_test] @@ -58,5 +58,4 @@ mod tests { let generated = crate::uuid_v6::idkit_uuidv6_generate_uuid(); assert_eq!(generated.len(), 16); } - } diff --git a/src/uuid_v7.rs b/src/uuid_v7.rs index 0f991bf..a57e97d 100644 --- a/src/uuid_v7.rs +++ b/src/uuid_v7.rs @@ -1,4 +1,4 @@ -use pgx::*; +use pgrx::*; use uuid7::uuid7; /// Generate a UUID v7 @@ -15,8 +15,8 @@ fn idkit_uuidv7_generate_text() -> String { /// Generate a UUID v7, producing a Postgres uuid object #[pg_extern] -fn idkit_uuidv7_generate_uuid() -> pgx::Uuid { - pgx::Uuid::from_slice(uuid7().as_bytes()) +fn idkit_uuidv7_generate_uuid() -> pgrx::Uuid { + pgrx::Uuid::from_slice(uuid7().as_bytes()) .unwrap_or_else(|e| error!("{}", format!("failed to generate/parse uuidv7: {}", e))) } @@ -27,7 +27,7 @@ fn idkit_uuidv7_generate_uuid() -> pgx::Uuid { #[cfg(any(test, feature = "pg_test"))] #[pg_schema] mod tests { - use pgx::*; + use pgrx::*; /// Basic length test #[pg_test] diff --git a/src/xid.rs b/src/xid.rs index 92c0d5a..5ecb22b 100644 --- a/src/xid.rs +++ b/src/xid.rs @@ -1,5 +1,5 @@ -use pgx::*; -use ::xid::{new as generate_xid}; +use ::xid::new as generate_xid; +use pgrx::*; /// Generate a random xid UUID #[pg_extern] @@ -20,7 +20,7 @@ fn idkit_xid_generate_text() -> String { #[cfg(any(test, feature = "pg_test"))] #[pg_schema] mod tests { - use pgx::*; + use pgrx::*; /// Basic length test #[pg_test]