pgsql: Fix tab completion of ALTER FUNCTION/PROCEDURE/ROUTINE ... SET S - Mailing list pgsql-committers

From Dean Rasheed
Subject pgsql: Fix tab completion of ALTER FUNCTION/PROCEDURE/ROUTINE ... SET S
Date
Msg-id E1pDkmx-002JV3-83@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix tab completion of ALTER FUNCTION/PROCEDURE/ROUTINE ... SET SCHEMA.

The ALTER DATABASE|FUNCTION|PROCEDURE|ROLE|ROUTINE|USER ... SET <name>
case in psql tab completion failed to exclude <name> = "SCHEMA", which
caused ALTER FUNCTION|PROCEDURE|ROUTINE ... SET SCHEMA to complete
with "FROM CURRENT" and "TO", which won't work.

Fix that, so that those cases now complete with the list of schemas,
like other ALTER ... SET SCHEMA commands.

Noticed while testing the recent patch to improve tab completion for
ALTER FUNCTION/PROCEDURE/ROUTINE, but this is not directly related to
that patch. Rather, this is a long-standing bug, so back-patch to all
supported branches.

Discussion: https://postgr.es/m/CALDaNm0s7GQmkLP_mx5Cvk=UzYMnjhPmXBxU8DsHEunFbC5sTg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e7a59094b36a49df057b040611314c9a0b726d05

Modified Files
--------------
src/bin/psql/tab-complete.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Dean Rasheed
Date:
Subject: pgsql: Improve tab completion for ALTER FUNCTION/PROCEDURE/ROUTINE.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Fix typo