We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 686e018 commit 43d5734Copy full SHA for 43d5734
expected/moc.out
@@ -589,27 +589,27 @@ SELECT intersection(moc) FROM (VALUES ('0/1-4'::smoc), ('0/2-5'), (NULL)) sub(mo
589
0/2-4
590
(1 row)
591
592
-SELECT smoc_round(6, '7/1,3,5,9');
593
- smoc_round
594
-------------
+SELECT smoc_degrade(6, '7/1,3,5,9');
+ smoc_degrade
+--------------
595
6/0-2
596
597
598
-SELECT smoc_round(5, '7/1,3,5,9');
599
600
+SELECT smoc_degrade(5, '7/1,3,5,9');
601
5/0
602
603
604
-SELECT smoc_round(0, '1/0');
605
606
+SELECT smoc_degrade(0, '1/0');
607
0/0
608
609
610
-SELECT smoc_round(0, '1/47');
611
612
+SELECT smoc_degrade(0, '1/47');
613
0/11
614
615
expected/moc1.out
@@ -112,8 +112,8 @@ EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
112
Buffers: shared hit=3
113
(3 rows)
114
115
-SELECT smoc_round(4, coverage) FROM moc1;
116
+SELECT smoc_degrade(4, coverage) FROM moc1;
117
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
118
0/3 8-9 1/2-3 5 7 9 11 20 29 31 40 42 44-45 2/5-7 25-27 32-33 35 41-43 64-66 68-69 74-75 77-79 84-86 89-92 96-97 101 103-104 106 109-111 115 121-123 164-166 172 184-186 188 3/0-1 10-11 13-15 17-19 64 66 69 71 77-79 97-99 136-137 139 161-163 268-270 280 295 306-307 348-350 353-355 372 376 383 393-396 398 409 411 420 422 433 435 448 455 459 481-483 668-670 696 701 703 748-750 756-757 766-767 4/8-10 12 16-18 30-31 38-39 49-51 67 260 262 268 281 283 288 290 301 303 305-307 387 552-553 555 640 642-643 1084-1085 1124-1126 1136-1137 1150-1153 1166-1167 1177-1179 1218-1219 1221-1223 1404-1406 1408-1409 1411 1492 1496 1508 1512 1525-1527 1529-1531 1568 1570-1571 1588 1590 1596 1598 1600 1602 1613 1615 1712 1714 1725 1727 1729 1731 1737-1739 1796-1798 1800-1802 1815 1819 1824 1831 1835 1921-1923 2768-2770 2781-2783 2788 2792 2794-2795 2803 2809 2811 3004 3032 3040-3042 3054-3055 3059 3062-3063
119
moc.c
@@ -34,7 +34,7 @@ PG_FUNCTION_INFO_V1(smoc_superset_spoint);
34
PG_FUNCTION_INFO_V1(smoc_not_superset_spoint);
35
PG_FUNCTION_INFO_V1(smoc_union);
36
PG_FUNCTION_INFO_V1(smoc_intersection);
37
-PG_FUNCTION_INFO_V1(smoc_round);
+PG_FUNCTION_INFO_V1(smoc_degrade);
38
PG_FUNCTION_INFO_V1(smoc_disc);
39
PG_FUNCTION_INFO_V1(smoc_scircle);
40
PG_FUNCTION_INFO_V1(smoc_spoly);
@@ -930,7 +930,7 @@ smoc_intersection(PG_FUNCTION_ARGS)
930
}
931
932
Datum
933
-smoc_round(PG_FUNCTION_ARGS)
+smoc_degrade(PG_FUNCTION_ARGS)
934
{
935
int order = PG_GETARG_INT32(0);
936
Smoc* moc_a = (Smoc *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
pgs_moc.h
@@ -85,7 +85,7 @@ Datum spoint_not_subset_smoc_c(SPoint*, Datum);
85
86
Datum smoc_union(PG_FUNCTION_ARGS);
87
Datum smoc_intersection(PG_FUNCTION_ARGS);
88
-Datum smoc_round(PG_FUNCTION_ARGS);
+Datum smoc_degrade(PG_FUNCTION_ARGS);
89
Datum smoc_disc(PG_FUNCTION_ARGS);
90
Datum smoc_scircle(PG_FUNCTION_ARGS);
91
Datum smoc_spoly(PG_FUNCTION_ARGS);
pgs_moc_ops.sql.in
@@ -248,15 +248,15 @@ COMMENT ON AGGREGATE intersection (smoc) IS 'smoc intersection aggregate';
248
249
-- smoc constructors
250
251
-CREATE FUNCTION smoc_round ("order" int, smoc)
+CREATE FUNCTION smoc_degrade ("order" int, smoc)
252
RETURNS smoc
253
AS 'MODULE_PATHNAME'
254
LANGUAGE C
255
PARALLEL SAFE
256
IMMUTABLE
257
STRICT;
258
259
-COMMENT ON FUNCTION smoc_round ("order" int, smoc) IS 'reduce order of smoc';
+COMMENT ON FUNCTION smoc_degrade ("order" int, smoc) IS 'reduce order of smoc';
260
261
CREATE FUNCTION smoc_disc ("order" int, lng double precision, lat double precision, radius double precision)
262
sql/moc.sql
@@ -133,10 +133,10 @@ SELECT '0/1'::smoc & '1/3,5,7,9' AS intersection;
133
SELECT '1/9,11,13,15'::smoc & '0/1,2' AS intersection;
134
SELECT intersection(moc) FROM (VALUES ('0/1-4'::smoc), ('0/2-5'), (NULL)) sub(moc);
135
136
137
138
139
140
141
WITH mocs(x) AS (VALUES ('0/'::smoc), ('0/1'), ('0/2'), ('0/4'), ('0/1,3'), ('0/1-3'), ('0/2-4'))
142
SELECT a.x AS a, b.x AS b,
sql/moc1.sql
@@ -37,4 +37,4 @@ EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT coverage FROM moc1 WHERE coverage <@ '0/0-11';
0 commit comments