pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Move keywords.c/kwlookup.c into src/common/.
Date: Thu, 24 Mar 2016 00:22:22 +0000
Message-ID: <E1ait2c-0001i3-Ii@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1ait2c-0001i3-Ii@gemulon.postgresql.org>
Permalink:  ../E1ait2c-0001i3-Ii@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ait2c-0001i3-Ii@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Move keywords.c/kwlookup.c into src/common/.
  In-Reply-To: <E1ait2c-0001i3-Ii@gemulon.postgresql.org>
  References: <E1ait2c-0001i3-Ii@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox