postgresql/src/bin
Tomas Vondra 88914332ea Fix tab completion for ALTER ROLE|USER ... RESET
Commit c407d5426b 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
c407d5426b.

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
2025-07-31 16:05:04 +02:00
..
initdb Don't put library-supplied -L/-I switches before user-supplied ones. 2025-07-29 15:17:40 -04:00
pg_amcheck Translation updates 2025-05-05 12:04:49 +02:00
pg_archivecleanup Translation updates 2025-07-14 13:54:38 +03:00
pg_basebackup Fix duplicate transaction replay during pg_createsubscriber. 2025-07-24 08:50:40 +00:00
pg_checksums Translation updates 2025-07-14 13:54:38 +03:00
pg_combinebackup Translation updates 2025-07-14 13:54:38 +03:00
pg_config Translation updates 2025-05-05 12:04:49 +02:00
pg_controldata Translation updates 2025-07-14 13:54:38 +03:00
pg_ctl Translation updates 2025-07-14 13:54:38 +03:00
pg_dump Sort dump objects independent of OIDs, for the 7 holdout object types. 2025-07-31 06:37:59 -07:00
pg_resetwal Translation updates 2025-07-14 13:54:38 +03:00
pg_rewind Translation updates 2025-07-14 13:54:38 +03:00
pg_test_fsync Translation updates 2025-05-05 12:04:49 +02:00
pg_test_timing Translation updates 2025-05-05 12:04:49 +02:00
pg_upgrade Translation updates 2025-07-14 13:54:38 +03:00
pg_verifybackup Translation updates 2025-07-14 13:54:38 +03:00
pg_waldump Translation updates 2025-07-14 13:54:38 +03:00
pg_walsummary pg_walsummary: Improve stability of test checking statistics 2025-07-08 13:48:52 +09:00
pgbench pgbench: Make set_random_seed() 64-bit everywhere. 2025-03-29 15:24:42 +01:00
pgevent Update copyright for 2025 2025-01-01 11:21:55 -05:00
psql Fix tab completion for ALTER ROLE|USER ... RESET 2025-07-31 16:05:04 +02:00
scripts Translation updates 2025-07-14 13:54:38 +03:00
Makefile Update copyright for 2025 2025-01-01 11:21:55 -05:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00