diff --git a/edb/pgsql/resolver/static.py b/edb/pgsql/resolver/static.py index b74dd7dd12f..5ee8fdaf131 100644 --- a/edb/pgsql/resolver/static.py +++ b/edb/pgsql/resolver/static.py @@ -179,9 +179,13 @@ def eval_FuncCall( ) if fn_name == "set_config": - # HACK: allow set_config('search_path', '', false) to support pg_dump - # HACK: allow set_config('bytea_output','hex',false) to support pgadmin - # HACK: allow set_config('jit', ...) to support asyncpg + # HACK: pg_dump + # - set_config('search_path', '', false) + # - set_config(name, 'view, foreign-table', false) + # HACK: pgadmin + # - set_config('bytea_output','hex',false) + # HACK: asyncpg + # - set_config('jit', ...) if args := eval_list(expr.args, ctx=ctx): name, value, is_local = args if isinstance(name, pgast.StringConstant): @@ -206,6 +210,18 @@ def eval_FuncCall( if name.val == "jit": return value + elif args := eval_list(expr.args[1:], ctx=ctx): + value, is_local = args + if ( + isinstance(value, pgast.StringConstant) + and isinstance(is_local, pgast.BooleanConstant) + ): + if ( + value.val == "view, foreign-table" + and not is_local.val + ): + return value + raise errors.QueryError( "function set_config is not supported", span=expr.span ) diff --git a/postgres b/postgres index b78fa8547d0..2caa85f4aae 160000 --- a/postgres +++ b/postgres @@ -1 +1 @@ -Subproject commit b78fa8547d02fc72ace679fb4d5289dccdbfc781 +Subproject commit 2caa85f4aae689e6f6721d7363b4c66a2a6417d6