From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Get rid of explicit argument-count markings in tab-complete.c. |
Date: | 2018-09-22 00:50:55 |
Message-ID: | E1g3W8N-0005kp-Ep@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Get rid of explicit argument-count markings in tab-complete.c.
This replaces the "TailMatchesN" macros with just "TailMatches",
and likewise "HeadMatchesN" becomes "HeadMatches" and "MatchesN"
becomes "Matches". The various COMPLETE_WITH_LISTn macros are
reduced to COMPLETE_WITH, and the single-item COMPLETE_WITH_CONST
also gets folded into that. This eliminates a lot of minor
annoyance in writing tab-completion rules. Usefully, the compiled
code also gets a bit smaller (10% or so, on my machine).
The implementation depends on variadic macros, so we couldn't have
done this before we required C99.
Andres Freund and Thomas Munro; some cosmetic cleanup by me.
Discussion: https://postgr.es/m/d8jo9djvm7h.fsf@dalvik.ping.uio.no
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4f3b38fe2bde72d59b7eab593ff72e0cebd9ecc6
Modified Files
--------------
src/bin/psql/tab-complete.c | 2551 ++++++++++++++++++++-----------------------
src/include/c.h | 33 +
2 files changed, 1222 insertions(+), 1362 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-09-22 06:26:29 | pgsql: Make GUC wal_sender_timeout user-settable |
Previous Message | Bruce Momjian | 2018-09-22 00:29:07 | Re: pgsql: In v11, disable JIT by default (it's still enabled by default in |