Re: Converting tab-complete.c's else-if chain to a switch
Jacob Champion <jacob.champion@enterprisedb.com>
From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>,
Thomas Munro <thomas.munro@gmail.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org
Date: 2024-10-10T18:25:18Z
Lists: pgsql-hackers
Attachments
- cov.diff (application/octet-stream) patch
Hi Tom,
Meson's coverage generation is unhappy with the new hardcoded #line
references emitted by gen_tabcomplete.pl:
genhtml: ERROR: cannot read
/home/jacob/src/postgres/worktree-oauth/build-dev/tab-complete.in.c
I've attached a potential fix which references $ARGV[0] instead, but
it's not really tested beyond "works for me".
While I was root-causing that, I also applied the following hunk to
align Meson's custom_target with the Makefile side:
@@ -27,8 +27,8 @@ tabcomplete = custom_target('tabcomplete',
input: 'tab-complete.in.c',
output: 'tab-complete.c',
command: [
- perl, files('gen_tabcomplete.pl'), files('tab-complete.in.c'),
- '--outfile', '@OUTPUT@', '@INPUT@',
+ perl, files('gen_tabcomplete.pl'), '@INPUT@',
+ '--outfile', '@OUTPUT@',
],
)
--Jacob
Commits
-
Don't hard-code the input file name in gen_tabcomplete.pl's output.
- c75c6f8d280a 18.0 landed
-
Avoid possible segfault in psql's tab completion.
- 95eb4cd4ff06 18.0 landed
-
Convert tab-complete's long else-if chain to a switch statement.
- f391d9dc93a2 18.0 landed
-
Prepare tab-complete.c for preprocessing.
- bd1276a3c943 18.0 landed
-
Invent "MatchAnyN" option for tab-complete.c's Matches/MatchesCS.
- ef0938f7bdd0 18.0 landed