Two small patches for the isolationtester lexer
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2018-02-21T19:56:59Z
Lists: pgsql-hackers
Attachments
- 0001-Increase-the-linebuf-in-the-isolation-spec-scanner.patch (application/octet-stream) patch 0001
- 0002-Allow-comments-in-the-isolation-spec-SQL-blocks.patch (application/octet-stream) patch 0002
When writing an isolation testcase recently I bumped into the 1024 line buffer size limit in the lexer for my setup block. Adding some stored procedures to the test makes it quite easy to break 1024 characters, and while these could be added as steps it, it’s not a good workaround since the permutation order becomes trickier (and more set in stone). As far as I can see in the history, this limit is chosen as a decent sized buffer and not rooted in a specific requirement, so I propose to bump it slightly to 2048 instead (an equally arbitrarily chosen number). Is there a reason to keep it at 1024 that I’m missing? 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. Since SQL comments will be counted towards the line buffer, and sent with the command, supporting both kinds of comments seems reasonable and consistent. make check passes with these patches applies, but I’m quite rusty in this area so I might be missing something. cheers ./daniel
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