Re: Two small patches for the isolationtester lexer
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2018-02-21T21:10:02Z
Lists: pgsql-hackers
I wrote; > Daniel Gustafsson <daniel@yesql.se> writes: >> I also (again) forgot about the # comments not being allowed inside setup and >> teardown blocks, so patch 0002 proposes adding support for these as the >> documentation implies. > Hmm, not sure this is a good idea. # is a valid SQL operator name, so > doing this would create some risk of breaking legal queries. Actually, looking closer, this would also trigger on '#' used inside a SQL literal, which seems to move the problem cases into the "pretty likely" category instead of the "far-fetched" one. So I'd only be OK with it if we made the lexer smart enough to distinguish inside-a-SQL- literal from not. That might be a good thing anyway, since it would allow us to not choke on literals containing '}', but it'd be a great deal more work. You might be able to steal code from the psql lexer though. regards, tom lane
Commits
-
Remove restriction on SQL block length in isolationtester scanner.
- e459eb9fb0c2 9.5.13 landed
- cadb14c271bf 9.4.18 landed
- 824cceded409 9.3.23 landed
- a030b997ae33 9.6.9 landed
- 38a1144a91d2 11.0 landed
- 14ffdd8cf88f 10.4 landed