From a52ad34be3073da255535e2e160e7be93bc06ab7 Mon Sep 17 00:00:00 2001 From: Scott Trinh Date: Tue, 4 Feb 2025 13:28:10 -0500 Subject: [PATCH] Add `pg_show_all_settings` to allowed pg functions (#8298) This is used by pgAdmin4 as of 8.12 and replaces their usage of the table `pg_catalog.pg_settings` with `pg_catalog.pg_show_all_settings()`. Closes #8297 See https://github.com/pgadmin-org/pgadmin4/pull/7870 --- edb/pgsql/resolver/static.py | 1 + tests/test_sql_query.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/edb/pgsql/resolver/static.py b/edb/pgsql/resolver/static.py index 88f40fedfab..b4d3b0d2885 100644 --- a/edb/pgsql/resolver/static.py +++ b/edb/pgsql/resolver/static.py @@ -226,6 +226,7 @@ def eval_TypeCast( 'pg_last_wal_replay_lsn', 'pg_current_wal_flush_lsn', 'pg_relation_is_publishable', + 'pg_show_all_settings', } ) diff --git a/tests/test_sql_query.py b/tests/test_sql_query.py index 1c16454d580..837b4cd1644 100644 --- a/tests/test_sql_query.py +++ b/tests/test_sql_query.py @@ -1968,7 +1968,8 @@ async def test_sql_query_pgadmin_hack(self): await self.scon.execute("SET DateStyle=ISO;") await self.scon.execute("SET client_min_messages=notice;") await self.scon.execute( - "SELECT set_config('bytea_output','hex',false) FROM pg_settings" + "SELECT set_config('bytea_output','hex',false)" + " FROM pg_catalog.pg_show_all_settings()" " WHERE name = 'bytea_output'; " ) await self.scon.execute("SET client_encoding='WIN874';")