]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix tab completion of ALTER FUNCTION/PROCEDURE/ROUTINE ... SET SCHEMA.
authorDean Rasheed <dean.a.rasheed@gmail.com>
Fri, 6 Jan 2023 11:09:56 +0000 (11:09 +0000)
committerDean Rasheed <dean.a.rasheed@gmail.com>
Fri, 6 Jan 2023 11:09:56 +0000 (11:09 +0000)
commitc54b888700814c5075f35995e4c0e32335e27d23
tree447d72d1bf9102965a3b24360bcb897b5bba20b1
parent0b496bc9881fdcb3c20aeaa08bcdc196b8ec6946
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
src/bin/psql/tab-complete.c