diff options
Diffstat (limited to 'src/test/regress/expected')
| -rw-r--r-- | src/test/regress/expected/create_index.out | 190 | ||||
| -rw-r--r-- | src/test/regress/expected/opr_sanity.out | 10 | ||||
| -rw-r--r-- | src/test/regress/expected/point.out | 18 | ||||
| -rw-r--r-- | src/test/regress/expected/sanity_check.out | 2 |
4 files changed, 218 insertions, 2 deletions
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out index b67f4e06f3..2275343704 100644 --- a/src/test/regress/expected/create_index.out +++ b/src/test/regress/expected/create_index.out @@ -51,6 +51,7 @@ CREATE INDEX onek2_stu1_prtl ON onek2 USING btree(stringu1 name_ops) CREATE INDEX grect2ind ON fast_emp4000 USING gist (home_base); CREATE INDEX gpolygonind ON polygon_tbl USING gist (f1); CREATE INDEX gcircleind ON circle_tbl USING gist (f1); +CREATE INDEX gpointind ON point_tbl USING gist (f1); CREATE TEMP TABLE gpolygon_tbl AS SELECT polygon(home_base) AS f1 FROM slow_emp4000; INSERT INTO gpolygon_tbl VALUES ( '(1000,0,0,1000)' ); @@ -112,6 +113,60 @@ SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle; 2 (1 row) +SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)'; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)'; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>'; + count +------- + 1 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)'; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)'; + count +------- + 2 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)'; + count +------- + 1 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)'; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)'; + count +------- + 1 +(1 row) + SET enable_seqscan = OFF; SET enable_indexscan = ON; SET enable_bitmapscan = ON; @@ -245,6 +300,141 @@ SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle; 2 (1 row) +EXPLAIN (COSTS OFF) +SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)'; + QUERY PLAN +---------------------------------------------------- + Aggregate + -> Index Scan using gpointind on point_tbl + Index Cond: (f1 <@ '(100,100),(0,0)'::box) +(3 rows) + +SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)'; + count +------- + 3 +(1 row) + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1; + QUERY PLAN +---------------------------------------------------- + Aggregate + -> Index Scan using gpointind on point_tbl + Index Cond: ('(100,100),(0,0)'::box @> f1) +(3 rows) + +SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1; + count +------- + 3 +(1 row) + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)'; + QUERY PLAN +---------------------------------------------------------------------------------------- + Aggregate + -> Index Scan using gpointind on point_tbl + Index Cond: (f1 <@ '((0,0),(0,100),(100,100),(50,50),(100,0),(0,0))'::polygon) +(3 rows) + +SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)'; + count +------- + 3 +(1 row) + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>'; + QUERY PLAN +---------------------------------------------------- + Aggregate + -> Index Scan using gpointind on point_tbl + Index Cond: (f1 <@ '<(50,50),50>'::circle) +(3 rows) + +SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>'; + count +------- + 1 +(1 row) + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)'; + QUERY PLAN +------------------------------------------------- + Aggregate + -> Index Scan using gpointind on point_tbl p + Index Cond: (f1 << '(0,0)'::point) +(3 rows) + +SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)'; + count +------- + 3 +(1 row) + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)'; + QUERY PLAN +------------------------------------------------- + Aggregate + -> Index Scan using gpointind on point_tbl p + Index Cond: (f1 >> '(0,0)'::point) +(3 rows) + +SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)'; + count +------- + 2 +(1 row) + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)'; + QUERY PLAN +------------------------------------------------- + Aggregate + -> Index Scan using gpointind on point_tbl p + Index Cond: (f1 <^ '(0,0)'::point) +(3 rows) + +SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)'; + count +------- + 1 +(1 row) + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)'; + QUERY PLAN +------------------------------------------------- + Aggregate + -> Index Scan using gpointind on point_tbl p + Index Cond: (f1 >^ '(0,0)'::point) +(3 rows) + +SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)'; + count +------- + 3 +(1 row) + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)'; + QUERY PLAN +------------------------------------------------- + Aggregate + -> Index Scan using gpointind on point_tbl p + Index Cond: (f1 ~= '(-5,-12)'::point) +(3 rows) + +SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)'; + count +------- + 1 +(1 row) + RESET enable_seqscan; RESET enable_indexscan; RESET enable_bitmapscan; diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out index 24a2e8a8e6..5e36d481df 100644 --- a/src/test/regress/expected/opr_sanity.out +++ b/src/test/regress/expected/opr_sanity.out @@ -902,17 +902,25 @@ ORDER BY 1, 2, 3; 783 | 8 | <@ 783 | 9 | &<| 783 | 10 | <<| + 783 | 10 | <^ + 783 | 11 | >^ 783 | 11 | |>> 783 | 12 | |&> 783 | 13 | ~ 783 | 14 | @ + 783 | 27 | @> + 783 | 28 | <@ + 783 | 47 | @> + 783 | 48 | <@ + 783 | 67 | @> + 783 | 68 | <@ 2742 | 1 | && 2742 | 1 | @@ 2742 | 2 | @> 2742 | 2 | @@@ 2742 | 3 | <@ 2742 | 4 | = -(31 rows) +(39 rows) -- Check that all operators linked to by opclass entries have selectivity -- estimators. This is not absolutely required, but it seems a reasonable diff --git a/src/test/regress/expected/point.out b/src/test/regress/expected/point.out index 9d1bd434e9..278837d091 100644 --- a/src/test/regress/expected/point.out +++ b/src/test/regress/expected/point.out @@ -82,6 +82,15 @@ SELECT '' AS three, p.* FROM POINT_TBL p (3 rows) SELECT '' AS three, p.* FROM POINT_TBL p + WHERE box '(0,0,100,100)' @> p.f1; + three | f1 +-------+------------ + | (0,0) + | (5.1,34.5) + | (10,10) +(3 rows) + +SELECT '' AS three, p.* FROM POINT_TBL p WHERE not p.f1 <@ box '(0,0,100,100)'; three | f1 -------+---------- @@ -98,6 +107,15 @@ SELECT '' AS two, p.* FROM POINT_TBL p | (-10,0) (2 rows) +SELECT '' AS three, p.* FROM POINT_TBL p + WHERE not box '(0,0,100,100)' @> p.f1; + three | f1 +-------+---------- + | (-10,0) + | (-3,4) + | (-5,-12) +(3 rows) + SELECT '' AS six, p.f1, p.f1 <-> point '(0,0)' AS dist FROM POINT_TBL p ORDER BY dist; diff --git a/src/test/regress/expected/sanity_check.out b/src/test/regress/expected/sanity_check.out index 2a4dc4755d..4dc59d9b5d 100644 --- a/src/test/regress/expected/sanity_check.out +++ b/src/test/regress/expected/sanity_check.out @@ -127,7 +127,7 @@ SELECT relname, relhasindex pg_ts_template | t pg_type | t pg_user_mapping | t - point_tbl | f + point_tbl | t polygon_tbl | t ramp | f real_city | f |
