aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/common/heaptuple.c
diff options
context:
space:
mode:
authorAndrew Gierth <rhodiumtoad@postgresql.org>2018-08-23 16:35:33 +0100
committerAndrew Gierth <rhodiumtoad@postgresql.org>2018-08-23 21:42:40 +0100
commitd4a63f829702cf28adb5db7e2ed44d2d9d893451 (patch)
treee3e5164836e920f8fa0fa8768e84f98578fecfd7 /src/backend/access/common/heaptuple.c
parent5ca00774194dc179d02867d536b73eb85fffd227 (diff)
downloadpostgresql-d4a63f829702cf28adb5db7e2ed44d2d9d893451.tar.gz
postgresql-d4a63f829702cf28adb5db7e2ed44d2d9d893451.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/access/common/heaptuple.c')
0 files changed, 0 insertions, 0 deletions