pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix tab completion for ALTER ROLE|USER ... RESET 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix tab completion for ALTER ROLE|USER ... RESET @ 2025-07-31 14:06 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2025-07-31 14:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix tab completion for ALTER ROLE|USER ... RESET Commit c407d5426b87 added tab completion for ALTER ROLE|USER ... RESET, with the intent to offer only the variables actually set on the role. But as soon as the user started typing something, it would start to offer all possible matching variables. Fix this the same way ALTER DATABASE ... RESET does it, i.e. by properly considering the prefix. A second issue causing similar symptoms (offering variables that are not actually set for a role) was caused by a match to another pattern. The ALTER DATABASE ... RESET was already excluded, so do the same thing for ROLE/USER. Report and fix by Dagfinn Ilmari Mannsåker. Backpatch to 18, same as c407d5426b87. Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Reviewed-by: jian he <jian.universality@gmail.com> Discussion: https://postgr.es/m/87qzyghw2x.fsf%40wibble.ilmari.org Discussion: https://postgr.es/m/87tt4lumqz.fsf%40wibble.ilmari.org Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ca09ef3a6aa69a1250bc83e6d9517f28a2ff181c Modified Files -------------- src/bin/psql/tab-complete.in.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix tab completion for ALTER ROLE|USER ... RESET @ 2025-07-31 14:06 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2025-07-31 14:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix tab completion for ALTER ROLE|USER ... RESET Commit c407d5426b87 added tab completion for ALTER ROLE|USER ... RESET, with the intent to offer only the variables actually set on the role. But as soon as the user started typing something, it would start to offer all possible matching variables. Fix this the same way ALTER DATABASE ... RESET does it, i.e. by properly considering the prefix. A second issue causing similar symptoms (offering variables that are not actually set for a role) was caused by a match to another pattern. The ALTER DATABASE ... RESET was already excluded, so do the same thing for ROLE/USER. Report and fix by Dagfinn Ilmari Mannsåker. Backpatch to 18, same as c407d5426b87. Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Reviewed-by: jian he <jian.universality@gmail.com> Discussion: https://postgr.es/m/87qzyghw2x.fsf%40wibble.ilmari.org Discussion: https://postgr.es/m/87tt4lumqz.fsf%40wibble.ilmari.org Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/88914332eaed702afb2cdbb0b776822738d58ece Modified Files -------------- src/bin/psql/tab-complete.in.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-07-31 14:06 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-07-31 14:06 pgsql: Fix tab completion for ALTER ROLE|USER ... RESET Tomas Vondra <tomas.vondra@postgresql.org> 2025-07-31 14:06 pgsql: Fix tab completion for ALTER ROLE|USER ... RESET Tomas Vondra <tomas.vondra@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox