regression tests: remove polygon diagrams
authorBruce Momjian <bruce@momjian.us>
Fri, 20 Mar 2015 02:10:52 +0000 (22:10 -0400)
committerBruce Momjian <bruce@momjian.us>
Fri, 20 Mar 2015 02:10:52 +0000 (22:10 -0400)
The diagrams were inaccurate.

Report by Emre Hasegeli

src/test/regress/expected/polygon.out
src/test/regress/sql/polygon.sql

index 9d3e07708b18e232de5f8eeb1dee57f93f38d9a0..2361274f9e83b95b8dd0a39c9ea41c96e80f3833 100644 (file)
@@ -3,16 +3,6 @@
 --
 -- polygon logic
 --
--- 3          o
---            |
--- 2        + |
---         /  |
--- 1      #   +
---       /  o |
--- 0    #-----o-+
---
---      0 1 2 3 4
---
 CREATE TABLE POLYGON_TBL(f1 polygon);
 INSERT INTO POLYGON_TBL(f1) VALUES ('(2.0,0.0),(2.0,4.0),(0.0,0.0)');
 INSERT INTO POLYGON_TBL(f1) VALUES ('(3.0,1.0),(3.0,3.0),(1.0,0.0)');
@@ -128,17 +118,6 @@ SELECT '' AS one, p.*
 --
 -- polygon logic
 --
--- 3          o
---           /|
--- 2        + |
---         /  |
--- 1      / o +
---       /    |
--- 0    +-----o-+
---
---      0 1 2 3 4
---
---
 -- left of
 SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' << polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false;
  false 
@@ -181,53 +160,24 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' @> polygon '(3.0,1.0),(3.0,3.0),(
  f
 (1 row)
 
---     +------------------------+
---     |    *---*               1
---     |  + |   |
---     |  2 *---*
---     +------------------------+
---                              3
---     endpoints '+' is ofr one polygon, '*' - for another
---     Edges 1-2, 2-3 are not shown on picture
 SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "false";
  false 
 -------
  f
 (1 row)
 
---     +-----------+
---     |    *---* /
---     |    |   |/
---     |    |   +
---     |    |   |\
---     |    *---* \
---     +-----------+
 SELECT '((0,4),(6,4),(3,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
  true 
 ------
  t
 (1 row)
 
---     +-----------------+
---     |                 |
---     |   +---*---*-----+
---     |   |   |   |
---     |   +---*---*-----+
---     |                 |
---     +-----------------+
 SELECT '((1,1),(1,4),(5,4),(5,3),(2,3),(2,2),(5,2),(5,1))'::polygon @> '((3,2),(3,3),(4,3),(4,2))'::polygon AS "false";
  false 
 -------
  f
 (1 row)
 
---     +---------+
---     |         |
---     |    *----*
---     |    |    |
---     |    *----*
---     |         |
---     +---------+
 SELECT '((0,0),(0,3),(3,3),(3,0))'::polygon @> '((2,1),(2,2),(3,2),(3,1))'::polygon AS "true";
  true 
 ------
@@ -248,25 +198,12 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' && polygon '(3.0,1.0),(3.0,3.0),(
  t
 (1 row)
 
---     +--------------------+
---     |    *---*           1
---     |  + |   |
---     |  2 *---*
---     +--------------------+
---                          3
---     Edges 1-2, 2-3 are not shown on picture
 SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon && '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
  true 
 ------
  t
 (1 row)
 
---     +--+ *--*
---     |  | |  |
---     |  | *--*
---     |  +----+
---     |       |
---     +-------+
 SELECT '((1,4),(1,1),(4,1),(4,2),(2,2),(2,4),(1,4))'::polygon && '((3,3),(4,3),(4,4),(3,4),(3,3))'::polygon AS "false";
  false 
 -------
index b4d9539347568aa7a230daba65d1cefc20b745bf..7ac807946566f274d0d81fd8f9fd49dc5c216c93 100644 (file)
@@ -3,16 +3,6 @@
 --
 -- polygon logic
 --
--- 3          o
---            |
--- 2        + |
---         /  |
--- 1      #   +
---       /  o |
--- 0    #-----o-+
---
---      0 1 2 3 4
---
 
 CREATE TABLE POLYGON_TBL(f1 polygon);
 
@@ -83,17 +73,6 @@ SELECT '' AS one, p.*
 --
 -- polygon logic
 --
--- 3          o
---           /|
--- 2        + |
---         /  |
--- 1      / o +
---       /    |
--- 0    +-----o-+
---
---      0 1 2 3 4
---
---
 -- left of
 SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' << polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false;
 
@@ -112,41 +91,12 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' <@ polygon '(3.0,1.0),(3.0,3.0),(
 -- contains
 SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' @> polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false;
 
---     +------------------------+
---     |    *---*               1
---     |  + |   |
---     |  2 *---*
---     +------------------------+
---                              3
---     endpoints '+' is ofr one polygon, '*' - for another
---     Edges 1-2, 2-3 are not shown on picture
 SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "false";
 
---     +-----------+
---     |    *---* /
---     |    |   |/
---     |    |   +
---     |    |   |\
---     |    *---* \
---     +-----------+
 SELECT '((0,4),(6,4),(3,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
 
---     +-----------------+
---     |                 |
---     |   +---*---*-----+
---     |   |   |   |
---     |   +---*---*-----+
---     |                 |
---     +-----------------+
 SELECT '((1,1),(1,4),(5,4),(5,3),(2,3),(2,2),(5,2),(5,1))'::polygon @> '((3,2),(3,3),(4,3),(4,2))'::polygon AS "false";
 
---     +---------+
---     |         |
---     |    *----*
---     |    |    |
---     |    *----*
---     |         |
---     +---------+
 SELECT '((0,0),(0,3),(3,3),(3,0))'::polygon @> '((2,1),(2,2),(3,2),(3,1))'::polygon AS "true";
 
 -- same
@@ -155,21 +105,8 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' ~= polygon '(3.0,1.0),(3.0,3.0),(
 -- overlap
 SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' && polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS true;
 
---     +--------------------+
---     |    *---*           1
---     |  + |   |
---     |  2 *---*
---     +--------------------+
---                          3
---     Edges 1-2, 2-3 are not shown on picture
 SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon && '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
 
---     +--+ *--*
---     |  | |  |
---     |  | *--*
---     |  +----+
---     |       |
---     +-------+
 SELECT '((1,4),(1,1),(4,1),(4,2),(2,2),(2,4),(1,4))'::polygon && '((3,3),(4,3),(4,4),(3,4),(3,3))'::polygon AS "false";
 SELECT '((200,800),(800,800),(800,200),(200,200))' &&  '(1000,1000,0,0)'::polygon AS "true";