From a61e15a5664536896f9d3a7454962d91a13d83bd Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu, 16 Aug 2001 22:24:43 +0000
Subject: [PATCH] geo_distance function needs to be marked strict. From Mark
 Stosberg.

---
 contrib/earthdistance/earthdistance.sql.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/earthdistance/earthdistance.sql.in b/contrib/earthdistance/earthdistance.sql.in
index fdb4552f8aa..087484da515 100644
--- a/contrib/earthdistance/earthdistance.sql.in
+++ b/contrib/earthdistance/earthdistance.sql.in
@@ -3,7 +3,8 @@
 
 DROP FUNCTION geo_distance (point, point);
 CREATE FUNCTION geo_distance (point, point) RETURNS float8
-  AS 'MODULE_PATHNAME' LANGUAGE 'c';
+  AS 'MODULE_PATHNAME' LANGUAGE 'c'
+  WITH (isstrict);
 
 SELECT geo_distance ('(1,2)'::point, '(3,4)'::point);
 
-- 
GitLab