pg func discovery ignore sys schemas (#946)

* Blessing results should destroy test db
* ignore `pg_catalog` and `information_schema` schemas during functions
autodiscovery
This commit is contained in:
Yuri Astrakhan 2023-10-16 21:22:54 -04:00 committed by GitHub
parent a1f794ae4a
commit 108bc05042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,7 @@ test-int: clean-test install-sqlx
fi
# Run integration tests and save its output as the new expected output
bless: start clean-test bless-insta
bless: restart clean-test bless-insta
rm -rf tests/temp
cargo test -p martin --features bless-tests
tests/test.sh

View File

@ -23,6 +23,7 @@ WITH
jsonb_agg(data_type::text ORDER BY ordinal_position) as input_types
FROM information_schema.parameters
WHERE parameter_mode = 'IN'
AND specific_schema NOT IN ('pg_catalog', 'information_schema')
GROUP BY specific_name),
--
outputs AS (
@ -32,6 +33,7 @@ WITH
jsonb_agg(parameter_name::text ORDER BY ordinal_position) as out_names
FROM information_schema.parameters
WHERE parameter_mode = 'OUT'
AND specific_schema NOT IN ('pg_catalog', 'information_schema')
GROUP BY specific_name),
--
comments AS (