diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2024-10-07 12:19:12 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2024-10-07 12:19:12 -0400 |
commit | bd1276a3c9433a9e2760db6ae6e73560d7d32a22 (patch) | |
tree | 4140ae1d7b024069a80f4deab041dd38e476074a /contrib/postgres_fdw/option.c | |
parent | ef0938f7bdd0838857da38b9a660191ec8411696 (diff) | |
download | postgresql-bd1276a3c9433a9e2760db6ae6e73560d7d32a22.tar.gz postgresql-bd1276a3c9433a9e2760db6ae6e73560d7d32a22.zip |
Prepare tab-complete.c for preprocessing.
Separate out psql_completion's giant else-if chain of *Matches
tests into a new function. Add the infrastructure needed for
table-driven checking of the initial match of each completion
rule. As-is, however, the code continues to operate as it did.
The new behavior applies only if SWITCH_CONVERSION_APPLIED
is #defined, which it is not here. (The preprocessor added
in the next patch will add a #define for that.)
The first and last couple of bits of psql_completion are not
based on HeadMatches/TailMatches/Matches tests, so they stay
where they are; they won't become part of the switch.
This patch also fixes up a couple of if-conditions that didn't meet
the 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.us
Diffstat (limited to 'contrib/postgres_fdw/option.c')
0 files changed, 0 insertions, 0 deletions