Fix tab completion for "ALTER SYSTEM SET variable ...".
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 15 Feb 2017 20:23:19 +0000 (15:23 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 15 Feb 2017 20:23:19 +0000 (15:23 -0500)
commita5d4e3ff79636a647a69e93ec8b9239703e9556a
tree51402ffb7023911641562fcbe610a30561c3c615
parent01e0cbc4f687325b825e7953f99f0b16a2bd4e96
Fix tab completion for "ALTER SYSTEM SET variable ...".

It wouldn't complete "TO" after the variable name, which is certainly
minor enough.  But since we do complete "TO" after "SET variable ...",
and since this case used to work pre-9.6, I think this is a bug.

Also, fix the query used to collect the variable names; whoever last
touched it evidently didn't understand how the pieces are supposed
to fit together.  It accidentally worked anyway, because readline
ignores irrelevant completions, but it was randomly unlike the ones
around it, and could be a source of actual bugs if someone copied
it as a prototype for another query.
src/bin/psql/tab-complete.c