summaryrefslogtreecommitdiff
path: root/contrib/seg/sql
diff options
context:
space:
mode:
authorAlvaro Herrera2008-04-18 18:43:09 +0000
committerAlvaro Herrera2008-04-18 18:43:09 +0000
commit7861d72ea204ef4085861f79f9c1749597160f72 (patch)
treed778614447739d8388ed9726b48422e623868571 /contrib/seg/sql
parentb8e5581d762acceda22dd7347ed43d2e013a6df1 (diff)
Modify the float4 datatype to be pass-by-val. Along the way, remove the last
uses of the long-deprecated float32 in contrib/seg; the definitions themselves are still there, but no longer used. fmgr/README updated to match. I added a CREATE FUNCTION to account for existing seg_center() code in seg.c too, and some tests for it and the neighbor functions. At the same time, remove checks for NULL which are not needed (because the functions are declared STRICT). I had to do some adjustments to contrib's btree_gist too. The choices for representation there are not ideal for changing the underlying types :-( Original patch by Zoltan Boszormenyi, with some adjustments by me.
Diffstat (limited to 'contrib/seg/sql')
-rw-r--r--contrib/seg/sql/seg.sql4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/seg/sql/seg.sql b/contrib/seg/sql/seg.sql
index 91d771db181..61ad519613e 100644
--- a/contrib/seg/sql/seg.sql
+++ b/contrib/seg/sql/seg.sql
@@ -223,3 +223,7 @@ SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
-- Test sorting
SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s;
+
+-- Test functions
+SELECT seg_lower(s), seg_center(s), seg_upper(s)
+FROM test_seg WHERE s @> '11.2..11.3' OR s IS NULL ORDER BY s;