-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to pgx 2.6; update dependencies; testing on postgres 14
- Loading branch information
Showing
9 changed files
with
116 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
[build] | ||
# Postgres symbols won't ve available until runtime | ||
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"] | ||
# Auto-generated by pgx. You may edit this, or delete it to have a new one created. | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
linker = "./.cargo/pgx-linker-script.sh" | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
linker = "./.cargo/pgx-linker-script.sh" | ||
|
||
[target.x86_64-apple-darwin] | ||
linker = "./.cargo/pgx-linker-script.sh" | ||
|
||
[target.aarch64-apple-darwin] | ||
linker = "./.cargo/pgx-linker-script.sh" | ||
|
||
[target.x86_64-unknown-freebsd] | ||
linker = "./.cargo/pgx-linker-script.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#! /usr/bin/env bash | ||
# Auto-generated by pgx. You may edit this, or delete it to have a new one created. | ||
|
||
if [[ $CARGO_BIN_NAME == "sql-generator" ]]; then | ||
UNAME=$(uname) | ||
if [[ $UNAME == "Darwin" ]]; then | ||
TEMP=$(mktemp pgx-XXX) | ||
echo "*_pgx_internals_*" > ${TEMP} | ||
gcc -exported_symbols_list ${TEMP} $@ | ||
rm -rf ${TEMP} | ||
else | ||
TEMP=$(mktemp pgx-XXX) | ||
echo "{ __pgx_internals_*; };" > ${TEMP} | ||
gcc -Wl,-dynamic-list=${TEMP} $@ | ||
rm -rf ${TEMP} | ||
fi | ||
else | ||
gcc -Wl,-undefined,dynamic_lookup $@ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
This file is auto generated by pgx. | ||
The ordering of items is not stable, it is driven by a dependency graph. | ||
*/ | ||
|
||
-- src/json_type_def.rs:4 | ||
-- pgx_json_schema::json_type_def::jtd_is_valid | ||
CREATE OR REPLACE FUNCTION "jtd_is_valid"( | ||
"schema" jsonb, /* pgx::datum::json::JsonB */ | ||
"instance" jsonb /* pgx::datum::json::JsonB */ | ||
) RETURNS bool /* bool */ | ||
STRICT | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'jtd_is_valid_wrapper'; | ||
|
||
-- src/json_type_def.rs:13 | ||
-- pgx_json_schema::json_type_def::jtd_get_errors | ||
CREATE OR REPLACE FUNCTION "jtd_get_errors"( | ||
"schema" jsonb, /* pgx::datum::json::JsonB */ | ||
"instance" jsonb /* pgx::datum::json::JsonB */ | ||
) RETURNS TABLE ( | ||
"instance_path" text, /* alloc::string::String */ | ||
"schema_path" text /* alloc::string::String */ | ||
) | ||
STRICT | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'jtd_get_errors_wrapper'; | ||
|
||
-- src/json_schema.rs:4 | ||
-- pgx_json_schema::json_schema::json_schema_is_valid | ||
CREATE OR REPLACE FUNCTION "json_schema_is_valid"( | ||
"schema" jsonb, /* pgx::datum::json::JsonB */ | ||
"instance" jsonb /* pgx::datum::json::JsonB */ | ||
) RETURNS bool /* bool */ | ||
STRICT | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'json_schema_is_valid_wrapper'; | ||
|
||
-- src/json_schema.rs:9 | ||
-- pgx_json_schema::json_schema::json_schema_get_errors | ||
CREATE OR REPLACE FUNCTION "json_schema_get_errors"( | ||
"schema" jsonb, /* pgx::datum::json::JsonB */ | ||
"instance" jsonb /* pgx::datum::json::JsonB */ | ||
) RETURNS TABLE ( | ||
"error_value" jsonb, /* pgx::datum::json::JsonB */ | ||
"description" text, /* alloc::string::String */ | ||
"details" text, /* alloc::string::String */ | ||
"instance_path" text, /* alloc::string::String */ | ||
"schema_path" text /* alloc::string::String */ | ||
) | ||
STRICT | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'json_schema_get_errors_wrapper'; | ||
|
||
-- src/avro.rs:5 | ||
-- pgx_json_schema::avro::avro_is_valid | ||
CREATE OR REPLACE FUNCTION "avro_is_valid"( | ||
"schema" jsonb, /* pgx::datum::json::JsonB */ | ||
"instance" jsonb /* pgx::datum::json::JsonB */ | ||
) RETURNS bool /* bool */ | ||
STRICT | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'avro_is_valid_wrapper'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* Auto-generated by pgx. You may edit this, or delete it to have a new one created. */ | ||
pgx::pg_binary_magic!(pgx_json_schema); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ fn jtd_get_errors( | |
} | ||
|
||
#[cfg(any(test, feature = "pg_test"))] | ||
#[pg_schema] | ||
mod tests { | ||
use pgx::*; | ||
|
||
|