aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-12-14 16:44:40 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-12-14 16:44:40 -0300
commitc54bc78b6171ee1ba3d903e9ead3e9b8a80518b8 (patch)
tree405686a9293b74bb8c2ec9ae5f3393396c450857 /src
parent4b58ded7498fccac1526cb27788dd7baad651b14 (diff)
downloadpostgresql-c54bc78b6171ee1ba3d903e9ead3e9b8a80518b8.tar.gz
postgresql-c54bc78b6171ee1ba3d903e9ead3e9b8a80518b8.zip
Add missing CHECK_FOR_INTERRUPTS in lseg_inside_poly
Apparently, there are bugs in this code that cause it to loop endlessly. That bug still needs more research, but in the meantime it's clear that the loop is missing a check for interrupts so that it can be cancelled timely. Backpatch to 9.1 -- this has been missing since 49475aab8d0d.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/geo_ops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index ca03947bc83..f7fe27a4fb3 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -20,6 +20,7 @@
#include <ctype.h>
#include "libpq/pqformat.h"
+#include "miscadmin.h"
#include "utils/builtins.h"
#include "utils/geo_decls.h"
@@ -3927,6 +3928,8 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
{
Point *interpt;
+ CHECK_FOR_INTERRUPTS();
+
s.p[1] = poly->p[i];
if (on_ps_internal(t.p, &s))