diff options
author | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-08-23 20:00:50 +0100 |
---|---|---|
committer | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-08-23 21:43:55 +0100 |
commit | 2dbfbd630bc952b5e6f7e484f5538abad499533f (patch) | |
tree | ad3214957e21e2ab02811e78dd126f936b62e490 /src/backend/executor/nodeHash.c | |
parent | 6953daf08e6b1ef333758f6cda54de228212f12e (diff) | |
download | postgresql-2dbfbd630bc952b5e6f7e484f5538abad499533f.tar.gz postgresql-2dbfbd630bc952b5e6f7e484f5538abad499533f.zip |
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 'src/backend/executor/nodeHash.c')
0 files changed, 0 insertions, 0 deletions