]> granicus.if.org Git - postgresql/commit
Fix pgbench lexer's "continuation" rule to cope with Windows newlines.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Sep 2018 16:11:43 +0000 (12:11 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Sep 2018 16:11:43 +0000 (12:11 -0400)
commit3ea7e015f37afd615234d94181840b8e6e44e6ed
tree23d2fa4fa10c5741e8d7bd42e6255bc9673adefa
parentc37401733aa73949507dbe6abf4d6137fd1f5529
Fix pgbench lexer's "continuation" rule to cope with Windows newlines.

Our general practice in frontend code is to accept input with either
Unix-style newlines (\n) or DOS-style (\r\n).  pgbench was mostly down
with that, but its rule for line continuations (backslash-newline) was
not.  This had been masked on Windows buildfarm machines before commit
0ba06e0bf by use of Windows text mode to read files.  We could have fixed
it by forcing text mode again, but it's better to fix the parsing code
so that Windows-style text files on Unix systems don't cause problems.

Back-patch to v10 where pgbench grew line continuations.

Discussion: https://postgr.es/m/17194.1537191697@sss.pgh.pa.us
src/bin/pgbench/exprscan.l