diff options
author | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-08-23 19:59:38 +0100 |
---|---|---|
committer | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-08-23 21:33:38 +0100 |
commit | 6c5ed6836340a801d522f620dceca1469b5bfbbc (patch) | |
tree | d994b1fc40dd7783276b0ceed63bd257f1438c29 /contrib/cube/cube.c | |
parent | 788ae09f4a9560c344a0c8457ffb66bba42be0a7 (diff) |
Reduce an unnecessary O(N^3) loop in lexer.
The lexer's handling of operators contained an O(N^3) hazard when
dealing with long strings of + or - characters; it seems hard to
prevent this case from being O(N^2), but the additional N multiplier
was not needed.
Backpatch all the way since this has been there since 7.x, and it
presents at least a mild hazard in that trying to do Bind, PREPARE or
EXPLAIN on a hostile query could take excessive time (without
honouring cancels or timeouts) even if the query was never executed.
Diffstat (limited to 'contrib/cube/cube.c')
0 files changed, 0 insertions, 0 deletions