polygon.out
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:4k
- QUERY: CREATE TABLE POLYGON_TBL(f1 polygon);
- QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('(2.0,0.0),(2.0,4.0),(0.0,0.0)');
- QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('(3.0,1.0),(3.0,3.0),(1.0,0.0)');
- QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0,0.0)');
- QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0,1.0),(0.0,1.0)');
- QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('0.0');
- ERROR: Bad polygon external representation '0.0'
- QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0 0.0');
- ERROR: Bad polygon external representation '(0.0 0.0'
- QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2)');
- ERROR: Bad polygon external representation '(0,1,2)'
- QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2,3');
- ERROR: Bad polygon external representation '(0,1,2,3'
- QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('asdf');
- ERROR: Bad polygon external representation 'asdf'
- QUERY: SELECT '' AS four, POLYGON_TBL.*;
- four|f1
- ----+-------------------
- |((2,0),(2,4),(0,0))
- |((3,1),(3,3),(1,0))
- |((0,0))
- |((0,1),(0,1))
- (4 rows)
- QUERY: SELECT '' AS three, p.*
- FROM POLYGON_TBL p
- WHERE p.f1 && '(3.0,1.0),(3.0,3.0),(1.0,0.0)';
- three|f1
- -----+-------------------
- |((2,0),(2,4),(0,0))
- |((3,1),(3,3),(1,0))
- (2 rows)
- QUERY: SELECT '' AS four, p.*
- FROM POLYGON_TBL p
- WHERE p.f1 &< '(3.0,1.0),(3.0,3.0),(1.0,0.0)';
- four|f1
- ----+-------------------
- |((2,0),(2,4),(0,0))
- |((3,1),(3,3),(1,0))
- |((0,0))
- |((0,1),(0,1))
- (4 rows)
- QUERY: SELECT '' AS two, p.*
- FROM POLYGON_TBL p
- WHERE p.f1 &> '(3.0,1.0),(3.0,3.0),(1.0,0.0)';
- two|f1
- ---+-------------------
- |((2,0),(2,4),(0,0))
- |((3,1),(3,3),(1,0))
- (2 rows)
- QUERY: SELECT '' AS one, p.*
- FROM POLYGON_TBL p
- WHERE p.f1 << '(3.0,1.0),(3.0,3.0),(1.0,0.0)';
- one|f1
- ---+-------------
- |((0,0))
- |((0,1),(0,1))
- (2 rows)
- QUERY: SELECT '' AS zero, p.*
- FROM POLYGON_TBL p
- WHERE p.f1 >> '(3.0,1.0),(3.0,3.0),(1.0,0.0)';
- zero|f1
- ----+--
- (0 rows)
- QUERY: SELECT '' AS one, p.*
- FROM POLYGON_TBL p
- WHERE p.f1 @ '(3.0,1.0),(3.0,3.0),(1.0,0.0)'::polygon;
- one|f1
- ---+-------------------
- |((3,1),(3,3),(1,0))
- (1 row)
- QUERY: SELECT '' AS one, p.*
- FROM POLYGON_TBL p
- WHERE p.f1 ~= '(3.0,1.0),(3.0,3.0),(1.0,0.0)'::polygon;
- one|f1
- ---+-------------------
- |((3,1),(3,3),(1,0))
- (1 row)
- QUERY: SELECT '' AS one, p.*
- FROM POLYGON_TBL p
- WHERE p.f1 ~ '(3.0,1.0),(3.0,3.0),(1.0,0.0)'::polygon;
- one|f1
- ---+-------------------
- |((3,1),(3,3),(1,0))
- (1 row)
- QUERY: SELECT '(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)'::polygon AS false;
- false
- -----
- f
- (1 row)
- QUERY: SELECT '(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)'::polygon AS true;
- true
- ----
- f
- (1 row)
- QUERY: SELECT '(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)'::polygon AS true;
- true
- ----
- t
- (1 row)
- QUERY: SELECT '(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)'::polygon AS false;
- false
- -----
- f
- (1 row)
- QUERY: SELECT '(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)'::polygon AS false;
- false
- -----
- f
- (1 row)
- QUERY: SELECT '(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)'::polygon AS false;
- false
- -----
- f
- (1 row)
- QUERY: SELECT '(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)'::polygon AS false;
- false
- -----
- f
- (1 row)
- QUERY: SELECT '(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)'::polygon AS true;
- true
- ----
- t
- (1 row)