pgsql: Fix pgbench lexer's "continuation" rule to cope with Windows new

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix pgbench lexer's "continuation" rule to cope with Windows new
Date: 2018-09-17 16:11:52
Message-ID: E1g1w7s-0006Z5-OI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3ea7e015f37afd615234d94181840b8e6e44e6ed

Modified Files
--------------
src/bin/pgbench/exprscan.l | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-09-17 16:13:56 Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi
Previous Message Andrew Dunstan 2018-09-17 15:13:28 Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi