agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion 3+ messages / 1 participants [nested] [flat]
* pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion @ 2026-09-11 09:16 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Fujii Masao @ 2026-09-11 09:16 UTC (permalink / raw) To: pgsql-committers@lists.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 <digoal@126.com> Author: Vismay Tiwari <vismay.t@gmail.com> Reviewed-by: Paul Kim <mok03127@gmail.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> 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(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion @ 2026-09-11 09:17 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Fujii Masao @ 2026-09-11 09:17 UTC (permalink / raw) To: pgsql-committers@lists.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 <digoal@126.com> Author: Vismay Tiwari <vismay.t@gmail.com> Reviewed-by: Paul Kim <mok03127@gmail.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/19523-424457118202f570@postgresql.org Discussion: https://postgr.es/m/CALHMmB84qkCgv3QAR78YawgfqQZCxSPkRhppxzU=e6fg8RA+AA@mail.gmail.com Backpatch-through: 18 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/043bc68b224e25578b1cc7e8ee7d54e0d03c762e Modified Files -------------- src/bin/psql/tab-complete.in.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion @ 2026-09-11 09:17 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Fujii Masao @ 2026-09-11 09:17 UTC (permalink / raw) To: pgsql-committers@lists.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 <digoal@126.com> Author: Vismay Tiwari <vismay.t@gmail.com> Reviewed-by: Paul Kim <mok03127@gmail.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/19523-424457118202f570@postgresql.org Discussion: https://postgr.es/m/CALHMmB84qkCgv3QAR78YawgfqQZCxSPkRhppxzU=e6fg8RA+AA@mail.gmail.com Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/db5d375d9ab2f83d29789eabef6720e1d4446667 Modified Files -------------- src/bin/psql/tab-complete.in.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-09-11 09:17 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-09-11 09:16 pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion Fujii Masao <fujii@postgresql.org> 2026-09-11 09:17 pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion Fujii Masao <fujii@postgresql.org> 2026-09-11 09:17 pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion Fujii Masao <fujii@postgresql.org>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox