postgresql/src/fe_utils
Tom Lane 965a3d6be0 Fix realfailN lexer rules to not make assumptions about input format.
The realfail1 and realfail2 backup-prevention rules always returned
token type FCONST, ignoring the possibility that what we've scanned
is more appropriately described as ICONST.  I think that at the
time that code was added, it might actually have been safe to not
distinguish; but since we started allowing AS-less aliases in SELECT
target lists, it's definitely legal to have a number immediately
followed by an identifier.

In the SELECT case, it seems there's no visible consequence because
make_const() will change the type back to integer anyway.  But I'm
worried that there are other contexts, or will be in future, where
it's more important to get the constant's type right.

Hence, use process_integer_literal to correctly determine which
token type to return.

Arguably this is a bug fix, but given the lack of evidence of
user-visible problems, I'll refrain from back-patching.

Discussion: https://postgr.es/m/21364.1542136808@sss.pgh.pa.us
2018-11-13 14:54:41 -05:00
..
.gitignore Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
Makefile Add \if support to pgbench 2018-03-22 17:42:03 +03:00
conditional.c Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
mbprint.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
print.c Switch client-side code to include catalog/pg_foo_d.h not pg_foo.h. 2018-04-08 13:59:52 -04:00
psqlscan.l Fix realfailN lexer rules to not make assumptions about input format. 2018-11-13 14:54:41 -05:00
simple_list.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
string_utils.c Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands. 2018-08-17 17:12:33 -04:00