pgsql: Tweak the core scanner so that it can be used by plpgsql too. - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Tweak the core scanner so that it can be used by plpgsql too.
Date
Msg-id 20090714202410.C81F475331E@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Tweak the core scanner so that it can be used by plpgsql too.

Changes:

Pass in the keyword lookup array instead of having it be hardwired.
(This incidentally allows elimination of some duplicate coding in ecpg.)

Re-order the token declarations in gram.y so that non-keyword tokens have
numbers that won't change when keywords are added or removed.

Add ".." and ":=" to the set of tokens recognized by scan.l.  (Since these
combinations are nowhere legal in core SQL, this does not change anything
except the precise wording of the error you get when you write this.)

Modified Files:
--------------
    pgsql/src/backend/parser:
        gram.y (r2.668 -> r2.669)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.668&r2=2.669)
        keywords.c (r1.213 -> r1.214)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/keywords.c?r1=1.213&r2=1.214)
        kwlookup.c (r2.2 -> r2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/kwlookup.c?r1=2.2&r2=2.3)
        parser.c (r1.80 -> r1.81)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parser.c?r1=1.80&r2=1.81)
        scan.l (r1.156 -> r1.157)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/scan.l?r1=1.156&r2=1.157)
    pgsql/src/backend/utils/adt:
        misc.c (r1.71 -> r1.72)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/misc.c?r1=1.71&r2=1.72)
        ruleutils.c (r1.301 -> r1.302)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.301&r2=1.302)
    pgsql/src/bin/pg_dump:
        dumputils.c (r1.46 -> r1.47)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/dumputils.c?r1=1.46&r2=1.47)
        keywords.c (r1.3 -> r1.4)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/keywords.c?r1=1.3&r2=1.4)
    pgsql/src/include/parser:
        gramparse.h (r1.46 -> r1.47)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/gramparse.h?r1=1.46&r2=1.47)
        keywords.h (r1.26 -> r1.27)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/keywords.h?r1=1.26&r2=1.27)
    pgsql/src/interfaces/ecpg/preproc:
        c_keywords.c (r1.23 -> r1.24)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/c_keywords.c?r1=1.23&r2=1.24)
        ecpg_keywords.c (r1.40 -> r1.41)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c?r1=1.40&r2=1.41)
        extern.h (r1.73 -> r1.74)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/extern.h?r1=1.73&r2=1.74)
        keywords.c (r1.88 -> r1.89)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/keywords.c?r1=1.88&r2=1.89)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Do a conditional SPI_push/SPI_pop when replanning a query in
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Remove duplicate definition of TYPECAST token.