forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5c837dd
committed
Rethink flex flags for syncrep_scanner.l.
Using flex's -i switch to achieve case-insensitivity is not a very safepractice, because the scanner's behavior may then depend on the localethat flex was invoked in. In the particular example at hand, that'snot academic: the possible matches for "FIRST" will be different in aTurkish locale than elsewhere. Do it the hard way instead, as ourother scanners do.Also, drop use of -b -CF -p, because this scanner is only used whenparsing the contents of a GUC variable. That's not done often, andthe amount of text to be parsed can be expected to be trivial, soprioritizing scanner speed over code size seems like quite the wrongtradeoff. Using flex's default optimization options reduces thesize of syncrep_gram.o by more than 50%.The case-insensitivity problem is new in HEAD (cf commit3901fd7).The poor choice of optimization flags exists also in 9.6, but it doesn'tseem important enough to back-patch.Discussion:https://postgr.es/m/24403.1495225931@sss.pgh.pa.us1 parenta95410e commit5c837dd
2 files changed
+6
-5
lines changedLines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
| 27 | + | |
28 | 28 |
| |
29 |
| - | |
30 |
| - | |
31 | 29 |
| |
32 | 30 |
| |
33 | 31 |
| |
| 32 | + |
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
67 |
| - | |
68 |
| - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
69 | 71 |
| |
70 | 72 |
| |
71 | 73 |
| |
|
0 commit comments
Comments
(0)