Skip to content

Commit 235af6b

Browse files
committed
update to pgx 0.4.0; update dependencies;
1 parent 3775d3d commit 235af6b

File tree

6 files changed

+16
-49
lines changed

6 files changed

+16
-49
lines changed

.cargo/config

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
# Auto-generated by pgx. You may edit this, or delete it to have a new one created.
2-
3-
[target.x86_64-unknown-linux-gnu]
4-
linker = "./.cargo/pgx-linker-script.sh"
5-
6-
[target.aarch64-unknown-linux-gnu]
7-
linker = "./.cargo/pgx-linker-script.sh"
8-
9-
[target.x86_64-apple-darwin]
10-
linker = "./.cargo/pgx-linker-script.sh"
11-
12-
[target.aarch64-apple-darwin]
13-
linker = "./.cargo/pgx-linker-script.sh"
14-
15-
[target.x86_64-unknown-freebsd]
16-
linker = "./.cargo/pgx-linker-script.sh"
1+
[build]
2+
# Postgres symbols won't be available until runtime
3+
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]

.cargo/pgx-linker-script.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "pgx_json_schema"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
edition = "2021"
55

66
[lib]
7-
crate-type = ["cdylib", "rlib"]
7+
crate-type = ["cdylib"]
88

99
[features]
1010
default = ["pg14"]
@@ -16,15 +16,15 @@ pg14 = ["pgx/pg14"]
1616
pg_test = []
1717

1818
[dependencies]
19-
pgx = "0.2.6"
20-
pgx-macros = "0.2.6"
21-
serde_json = "1.0.73"
22-
jsonschema = "0.13.3"
19+
pgx = "0.4.0"
20+
pgx-macros = "0.4.0"
21+
serde_json = "1.0.79"
22+
jsonschema = "0.15.0"
2323
jtd = "0.3.1"
2424
avro-rs = "0.13.0"
2525

2626
[dev-dependencies]
27-
pgx-tests = "0.2.6"
27+
pgx-tests = "0.4.0"
2828

2929
[profile.dev]
3030
panic = "unwind"

src/bin/sql-generator.rs

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/json_schema.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use pgx::*;
21
use jsonschema::JSONSchema;
2+
use pgx::*;
33

44
#[pg_extern]
55
fn json_schema_is_valid(schema: JsonB, instance: JsonB) -> bool {
@@ -62,6 +62,9 @@ mod tests {
6262
let (_value, description) = Spi::get_two::<JsonB, String>(
6363
"select * from json_schema_get_errors('{\"maxLength\": 5}', '\"foobar\"'::jsonb)",
6464
);
65-
assert_eq!(description, Some("\"foobar\" is longer than 5 characters".to_string()))
65+
assert_eq!(
66+
description,
67+
Some("\"foobar\" is longer than 5 characters".to_string())
68+
)
6669
}
6770
}

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1+
mod avro;
12
mod json_schema;
23
mod json_type_def;
3-
mod avro;
4-
54

65
use pgx::*;
76

87
pg_module_magic!();
98

10-
119
#[cfg(test)]
1210
pub mod pg_test {
1311
pub fn setup(_options: Vec<&str>) {

0 commit comments

Comments
 (0)