forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit965a3d6
committed
Fix realfailN lexer rules to not make assumptions about input format.
The realfail1 and realfail2 backup-prevention rules always returnedtoken type FCONST, ignoring the possibility that what we've scannedis more appropriately described as ICONST. I think that at thetime that code was added, it might actually have been safe to notdistinguish; but since we started allowing AS-less aliases in SELECTtarget lists, it's definitely legal to have a number immediatelyfollowed by an identifier.In the SELECT case, it seems there's no visible consequence becausemake_const() will change the type back to integer anyway. But I'mworried that there are other contexts, or will be in future, whereit's more important to get the constant's type right.Hence, use process_integer_literal to correctly determine whichtoken type to return.Arguably this is a bug fix, but given the lack of evidence ofuser-visible problems, I'll refrain from back-patching.Discussion:https://postgr.es/m/21364.1542136808@sss.pgh.pa.us1 parent4766bcd commit965a3d6
File tree
3 files changed
+21
-22
lines changed- src
- backend/parser
- fe_utils
- interfaces/ecpg/preproc
3 files changed
+21
-22
lines changedLines changed: 9 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1005 | 1005 |
| |
1006 | 1006 |
| |
1007 | 1007 |
| |
1008 |
| - | |
1009 |
| - | |
1010 |
| - | |
1011 |
| - | |
| 1008 | + | |
| 1009 | + | |
1012 | 1010 |
| |
1013 | 1011 |
| |
1014 | 1012 |
| |
1015 |
| - | |
1016 |
| - | |
| 1013 | + | |
1017 | 1014 |
| |
1018 | 1015 |
| |
1019 | 1016 |
| |
1020 | 1017 |
| |
1021 | 1018 |
| |
1022 |
| - | |
1023 |
| - | |
| 1019 | + | |
1024 | 1020 |
| |
1025 | 1021 |
| |
1026 | 1022 |
| |
| |||
1255 | 1251 |
| |
1256 | 1252 |
| |
1257 | 1253 |
| |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
1258 | 1258 |
| |
1259 | 1259 |
| |
1260 | 1260 |
| |
| |||
1265 | 1265 |
| |
1266 | 1266 |
| |
1267 | 1267 |
| |
1268 |
| - | |
| 1268 | + | |
1269 | 1269 |
| |
1270 | 1270 |
| |
1271 | 1271 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
887 | 887 |
| |
888 | 888 |
| |
889 | 889 |
| |
890 |
| - | |
891 |
| - | |
892 |
| - | |
893 |
| - | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
894 | 893 |
| |
895 | 894 |
| |
896 | 895 |
| |
|
Lines changed: 9 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
900 | 900 |
| |
901 | 901 |
| |
902 | 902 |
| |
903 |
| - | |
904 |
| - | |
905 |
| - | |
906 |
| - | |
| 903 | + | |
| 904 | + | |
907 | 905 |
| |
908 | 906 |
| |
909 |
| - | |
910 |
| - | |
| 907 | + | |
911 | 908 |
| |
912 | 909 |
| |
913 | 910 |
| |
914 | 911 |
| |
915 |
| - | |
916 |
| - | |
| 912 | + | |
917 | 913 |
| |
918 | 914 |
| |
919 | 915 |
| |
| |||
1473 | 1469 |
| |
1474 | 1470 |
| |
1475 | 1471 |
| |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
1476 | 1476 |
| |
1477 | 1477 |
| |
1478 | 1478 |
| |
| |||
1483 | 1483 |
| |
1484 | 1484 |
| |
1485 | 1485 |
| |
1486 |
| - | |
| 1486 | + | |
1487 | 1487 |
| |
1488 | 1488 |
| |
1489 | 1489 |
| |
|
0 commit comments
Comments
(0)