agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion
Date: Fri, 11 Sep 2026 09:17:05 +0000
Message-ID: <E1x4xNY-00000004PkD-188Q@gemulon.postgresql.org> (raw)
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(-)
view thread (3+ messages) latest in thread
Message-ID: <E1x4xNY-00000004PkD-188Q@gemulon.postgresql.org>
Permalink: ../E1x4xNY-00000004PkD-188Q@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x4xNY-00000004PkD-188Q@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: psql: Schema-qualify catalogs in ALTER DATABASE RESET completion
In-Reply-To: <E1x4xNY-00000004PkD-188Q@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox