Skip to content

Commit 5649332

Browse files
committed
Fix earthdistance test suite function name typo.
Affected test queries have been testing the wrong thing since their introduction in commit 4c1383e. Back-patch to 9.3 (all supported versions).
1 parent 8c477a4 commit 5649332

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

contrib/earthdistance/expected/earthdistance.out

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -881,11 +881,12 @@ SELECT earth_box(ll_to_earth(90,180),
881881
--
882882
-- Test the recommended constraints.
883883
--
884-
SELECT is_point(ll_to_earth(0,0));
885-
ERROR: function is_point(earth) does not exist
886-
LINE 1: SELECT is_point(ll_to_earth(0,0));
887-
^
888-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
884+
SELECT cube_is_point(ll_to_earth(0,0));
885+
cube_is_point
886+
---------------
887+
t
888+
(1 row)
889+
889890
SELECT cube_dim(ll_to_earth(0,0)) <= 3;
890891
?column?
891892
----------
@@ -899,11 +900,12 @@ SELECT abs(cube_distance(ll_to_earth(0,0), '(0)'::cube) / earth() - 1) <
899900
t
900901
(1 row)
901902

902-
SELECT is_point(ll_to_earth(30,60));
903-
ERROR: function is_point(earth) does not exist
904-
LINE 1: SELECT is_point(ll_to_earth(30,60));
905-
^
906-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
903+
SELECT cube_is_point(ll_to_earth(30,60));
904+
cube_is_point
905+
---------------
906+
t
907+
(1 row)
908+
907909
SELECT cube_dim(ll_to_earth(30,60)) <= 3;
908910
?column?
909911
----------
@@ -917,11 +919,12 @@ SELECT abs(cube_distance(ll_to_earth(30,60), '(0)'::cube) / earth() - 1) <
917919
t
918920
(1 row)
919921

920-
SELECT is_point(ll_to_earth(60,90));
921-
ERROR: function is_point(earth) does not exist
922-
LINE 1: SELECT is_point(ll_to_earth(60,90));
923-
^
924-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
922+
SELECT cube_is_point(ll_to_earth(60,90));
923+
cube_is_point
924+
---------------
925+
t
926+
(1 row)
927+
925928
SELECT cube_dim(ll_to_earth(60,90)) <= 3;
926929
?column?
927930
----------
@@ -935,11 +938,12 @@ SELECT abs(cube_distance(ll_to_earth(60,90), '(0)'::cube) / earth() - 1) <
935938
t
936939
(1 row)
937940

938-
SELECT is_point(ll_to_earth(-30,-90));
939-
ERROR: function is_point(earth) does not exist
940-
LINE 1: SELECT is_point(ll_to_earth(-30,-90));
941-
^
942-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
941+
SELECT cube_is_point(ll_to_earth(-30,-90));
942+
cube_is_point
943+
---------------
944+
t
945+
(1 row)
946+
943947
SELECT cube_dim(ll_to_earth(-30,-90)) <= 3;
944948
?column?
945949
----------

contrib/earthdistance/sql/earthdistance.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,19 +282,19 @@ SELECT earth_box(ll_to_earth(90,180),
282282
-- Test the recommended constraints.
283283
--
284284

285-
SELECT is_point(ll_to_earth(0,0));
285+
SELECT cube_is_point(ll_to_earth(0,0));
286286
SELECT cube_dim(ll_to_earth(0,0)) <= 3;
287287
SELECT abs(cube_distance(ll_to_earth(0,0), '(0)'::cube) / earth() - 1) <
288288
'10e-12'::float8;
289-
SELECT is_point(ll_to_earth(30,60));
289+
SELECT cube_is_point(ll_to_earth(30,60));
290290
SELECT cube_dim(ll_to_earth(30,60)) <= 3;
291291
SELECT abs(cube_distance(ll_to_earth(30,60), '(0)'::cube) / earth() - 1) <
292292
'10e-12'::float8;
293-
SELECT is_point(ll_to_earth(60,90));
293+
SELECT cube_is_point(ll_to_earth(60,90));
294294
SELECT cube_dim(ll_to_earth(60,90)) <= 3;
295295
SELECT abs(cube_distance(ll_to_earth(60,90), '(0)'::cube) / earth() - 1) <
296296
'10e-12'::float8;
297-
SELECT is_point(ll_to_earth(-30,-90));
297+
SELECT cube_is_point(ll_to_earth(-30,-90));
298298
SELECT cube_dim(ll_to_earth(-30,-90)) <= 3;
299299
SELECT abs(cube_distance(ll_to_earth(-30,-90), '(0)'::cube) / earth() - 1) <
300300
'10e-12'::float8;

0 commit comments

Comments
 (0)