Re: Two small patches for the isolationtester lexer

2018-02-28 Thread Daniel Gustafsson
> On 01 Mar 2018, at 06:01, Tom Lane wrote: > Daniel Gustafsson writes: >> I agree, patch 0002 was broken and the correct fix is a much bigger project - >> one too big for me to tackle right now (but hopefully at some point in the >> near >> future). Thanks for the review of it though! > > OK

Re: Two small patches for the isolationtester lexer

2018-02-28 Thread Tom Lane
Daniel Gustafsson writes: > On 22 Feb 2018, at 05:10, Tom Lane wrote: >> 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 i

Re: Two small patches for the isolationtester lexer

2018-02-28 Thread Tom Lane
Daniel Gustafsson writes: >> On 22 Feb 2018, at 05:12, Tom Lane wrote: >> Another idea is just to teach addlitchar to realloc the buffer bigger >> when necessary. > I think this is the best approach for the task, the attached patch changes the > static allocation to instead realloc when required

Re: Two small patches for the isolationtester lexer

2018-02-26 Thread Daniel Gustafsson
> On 22 Feb 2018, at 05:10, Tom Lane wrote: > > I wrote; >> Daniel Gustafsson 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

Re: Two small patches for the isolationtester lexer

2018-02-26 Thread Daniel Gustafsson
> On 22 Feb 2018, at 05:12, Tom Lane wrote: > > Daniel Gustafsson writes: >> On 21 Feb 2018, at 21:41, Tom Lane wrote: >>> I can't think of one; but I wonder if it's worth working a bit harder and >>> removing the fixed limit altogether, probably by using a PQExpBuffer. >>> If you've hit 1024 t

Re: Two small patches for the isolationtester lexer

2018-02-21 Thread Tom Lane
Daniel Gustafsson writes: > On 21 Feb 2018, at 21:41, Tom Lane wrote: >> I can't think of one; but I wonder if it's worth working a bit harder and >> removing the fixed limit altogether, probably by using a PQExpBuffer. >> If you've hit 1024 today, somebody will bump up against 2048 tomorrow. >

Re: Two small patches for the isolationtester lexer

2018-02-21 Thread Tom Lane
I wrote; > Daniel Gustafsson 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 > doi

Re: Two small patches for the isolationtester lexer

2018-02-21 Thread Daniel Gustafsson
> On 21 Feb 2018, at 21:41, Tom Lane wrote: > > Daniel Gustafsson writes: >> 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 character

Two small patches for the isolationtester lexer

2018-02-21 Thread Daniel Gustafsson
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 permut

Re: Two small patches for the isolationtester lexer

2018-02-21 Thread Tom Lane
Daniel Gustafsson writes: > 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