pgsql: Move keywords.c/kwlookup.c into src/common/. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Move keywords.c/kwlookup.c into src/common/.
Date
Msg-id E1ait2c-0001i3-Ii@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Move keywords.c/kwlookup.c into src/common/.

Now that we have src/common/ for code shared between frontend and backend,
we can get rid of (most of) the klugy ways that the keyword table and
keyword lookup code were formerly shared between different uses.
This is a first step towards a more general plan of getting rid of
special-purpose kluges for sharing code in src/bin/.

I chose to merge kwlookup.c back into keywords.c, as it once was, and
always has been so far as keywords.h is concerned.  We could have
kept them separate, but there is noplace that uses ScanKeywordLookup
without also wanting access to the backend's keyword list, so there
seems little point.

ecpg is still a bit weird, but at least now the trickiness is documented.

I think that the MSVC build script should require no adjustments beyond
what's done here ... but we'll soon find out.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/2c6af4f44228d76d3351fe26f68b00b55cdd239a

Modified Files
--------------
src/backend/parser/Makefile            |   4 +-
src/backend/parser/README              |   6 +-
src/backend/parser/keywords.c          |  27 --------
src/backend/parser/kwlookup.c          |  89 -------------------------
src/backend/utils/adt/misc.c           |   2 +-
src/backend/utils/adt/ruleutils.c      |   2 +-
src/bin/pg_dump/.gitignore             |   2 -
src/bin/pg_dump/Makefile               |  19 ++----
src/bin/pg_dump/dumputils.c            |  10 +--
src/bin/pg_dump/keywords.c             |  30 ---------
src/bin/psql/.gitignore                |   2 -
src/bin/psql/Makefile                  |   9 +--
src/bin/scripts/.gitignore             |   2 -
src/bin/scripts/Makefile               |  23 +++----
src/common/Makefile                    |  14 +++-
src/common/keywords.c                  | 114 +++++++++++++++++++++++++++++++++
src/include/common/keywords.h          |  39 +++++++++++
src/include/parser/gramparse.h         |   4 +-
src/include/parser/keywords.h          |  38 -----------
src/include/parser/scanner.h           |   2 +-
src/interfaces/ecpg/preproc/.gitignore |   1 -
src/interfaces/ecpg/preproc/Makefile   |   7 +-
src/interfaces/ecpg/preproc/extern.h   |   3 +-
src/interfaces/ecpg/preproc/keywords.c |  16 ++++-
src/tools/msvc/Mkvcbuild.pm            |  21 ++----
25 files changed, 220 insertions(+), 266 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Disable abbreviated keys for string-sorting in non-C locales.
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Support CREATE ACCESS METHOD