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))