postgresql/src
Tom Lane d160882a17 Fix bootstrap parser so that its keywords are unreserved words.
Mark Dilger pointed out that the bootstrap parser does not allow
any of its keywords to appear as column values unless they're quoted,
and proposed dealing with that by quoting such values in genbki.pl.
Looking closer, though, we also have that problem with respect to table,
column, and type names appearing in the .bki file: the parser would fail
if any of those matched any of its keywords.  While so far there have
been no conflicts (that I've heard of), this seems like a booby trap
waiting to catch somebody.  Rather than clutter genbki.pl with enough
quoting logic to handle all that, let's make the bootstrap parser grow
up a little bit and treat its keywords as unreserved.

Experimentation shows that it's fairly easy to do so with the exception
of _null_, which I don't have a big problem with keeping as a reserved
word.  The only change needed is that we can't have the "close" command
take an optional table name: it has to either require or forbid the
table name to avoid shift/reduce conflicts.  genbki.pl has historically
always included the table name, so I took that option.

The implementation has bootscanner.l passing forward the string value
of each keyword, in case bootparse.y needs that.  This avoids needing to
know the precise spelling of each keyword in bootparse.y, which is good
because that's not always obvious from the token name.

Discussion: https://postgr.es/m/3024FC91-DB6D-4732-B31C-DF772DF039A0@gmail.com
2018-05-05 16:23:07 -04:00
..
backend Fix bootstrap parser so that its keywords are unreserved words. 2018-05-05 16:23:07 -04:00
bin Remove extra newlines after PQerrorMessage() 2018-05-05 10:51:38 -04:00
common Enlarge find_other_exec's meager fgets buffer 2018-04-19 10:45:15 -03:00
fe_utils Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
include Fix scenario where streaming standby gets stuck at a continuation record. 2018-05-05 01:34:53 +03:00
interfaces Further -Wimplicit-fallthrough cleanup. 2018-05-01 19:53:48 -07:00
makefiles Remove Windows module-list-dumping code. 2018-04-30 13:20:13 -04:00
pl Update expected files for older Python versions 2018-05-03 20:29:54 -04:00
port Further improve code for probing the availability of ARM CRC instructions. 2018-05-03 11:32:57 -04:00
template Force "restrict" not to be used when compiling with xlc. 2017-10-13 12:15:06 -07:00
test Revert "Test conversion of NaN between float4 and float8." 2018-05-05 13:22:11 -04:00
timezone Sync our copy of the timezone library with IANA release tzcode2018e. 2018-05-04 12:26:25 -04:00
tools Provide for testing on python3 modules when under MSVC 2018-05-04 15:22:48 -04:00
tutorial Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Un-break contrib install with llvm. 2018-04-28 14:45:39 -04:00
Makefile.shlib Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00