forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbd1276a
committed
Prepare tab-complete.c for preprocessing.
Separate out psql_completion's giant else-if chain of *Matchestests into a new function. Add the infrastructure needed fortable-driven checking of the initial match of each completionrule. As-is, however, the code continues to operate as it did.The new behavior applies only if SWITCH_CONVERSION_APPLIEDis #defined, which it is not here. (The preprocessor addedin the next patch will add a #define for that.)The first and last couple of bits of psql_completion are notbased on HeadMatches/TailMatches/Matches tests, so they staywhere they are; they won't become part of the switch.This patch also fixes up a couple of if-conditions that didn't meetthe conditions enumerated in the comment for match_previous_words().Those restrictions exist to simplify the preprocessor.Discussion:https://postgr.es/m/2208466.1720729502@sss.pgh.pa.us1 parentef0938f commitbd1276a
2 files changed
+269
-76
lines changed0 commit comments
Comments
(0)