pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion
pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion
От:
Fujii Masao <fujii@postgresql.org>
Дата:
psql: Schema-qualify catalogs in ALTER DATABASE RESET completion The tab-completion query used for ALTER DATABASE ... RESET referenced pg_db_role_setting and pg_database without schema qualification, so a same-named relation earlier in search_path could be used instead of the system catalogs. This could make psql offer misleading RESET candidates. Commit dbf5a83d465 schema-qualified the unnest() call in this same query, but the catalog references were still left unqualified. Fix that by referring to pg_catalog.pg_db_role_setting and pg_catalog.pg_database explicitly. Backpatch to 18, where the tab-completion for ALTER DATABASE ... RESET was introduced. Bug: #19523 Reported-by: Zhou Digoal Author: Vismay Tiwari Reviewed-by: Paul Kim Reviewed-by: Kirill Reshke Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/19523-424457118202f570@postgresql.org Discussion: https://postgr.es/m/CALHMmB84qkCgv3QAR78YawgfqQZCxSPkRhppxzU=e6fg8RA+AA@mail.gmail.com Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/42ce84f878a4e2137c4a4520631eb236c9f1988f Modified Files -------------- src/bin/psql/tab-complete.in.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)