circle-in-input-format-fix.patch

text/plain

Filename: circle-in-input-format-fix.patch
Type: text/plain
Part: 0
Message: ERROR: invalid input syntax for type circle

Patch

Format: unified
File+
src/backend/utils/adt/geo_ops.c 1 1
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 373784fcc1..6efd5bc1f2 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -4528,7 +4528,7 @@ circle_in(PG_FUNCTION_ARGS)
 
 	while (depth > 0)
 	{
-		if ((*s == RDELIM) || ((*s == RDELIM_C) && (depth == 1)))
+		if ((*s == RDELIM) || (((*s == RDELIM_C) || (*s == '\0')) && (depth == 1)))
 		{
 			depth--;
 			s++;