From 63121c848ae0f8754f3cd05457bb21905c659a98 Mon Sep 17 00:00:00 2001 From: sqyyeah Date: Thu, 25 Feb 2021 17:18:16 +0800 Subject: [PATCH] fix circle type bug --- src/common/backend/utils/adt/geo_ops.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/backend/utils/adt/geo_ops.cpp b/src/common/backend/utils/adt/geo_ops.cpp index 5b8dde048..03d7f8c68 100755 --- a/src/common/backend/utils/adt/geo_ops.cpp +++ b/src/common/backend/utils/adt/geo_ops.cpp @@ -4092,14 +4092,18 @@ Datum circle_in(PG_FUNCTION_ARGS) while (isspace((unsigned char)*s)) { s++; } - if ((*s == LDELIM_C) || (*s == LDELIM)) { + if (*s == LDELIM_C) { depth++; + s++; + } else if (*s == LDELIM) { cp = (s + 1); while (isspace((unsigned char)*cp)) { cp++; } - if (*cp == LDELIM) - s = cp; + if (*cp == LDELIM) { + depth++; + s = cp; + } } if (!pair_decode(s, &circle->center.x, &circle->center.y, &s))