Skip to content

Commit

Permalink
pg func discovery ignore sys schemas (#946)
Browse files Browse the repository at this point in the history
* Blessing results should destroy test db
* ignore `pg_catalog` and `information_schema` schemas during functions
autodiscovery
  • Loading branch information
nyurik authored Oct 17, 2023
1 parent a1f794a commit 108bc05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions martin/src/pg/scripts/query_available_function.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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 (
Expand Down

0 comments on commit 108bc05

Please sign in to comment.