Commit 622af87f authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Results from initial changes to add new functions and for bug fixes.

Not all cleaned up yet.
parent 3d5dd9bd
...@@ -144,16 +144,16 @@ QUERY: SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime ...@@ -144,16 +144,16 @@ QUERY: SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
< 'Jan 14 14:00:00 1971'::abstime < 'Jan 14 14:00:00 1971'::abstime
ORDER BY abstime, reltime; ORDER BY abstime, reltime;
ten|abstime |reltime ten|abstime |reltime
---+----------------------------+---------------- ---+----------------------------+-------------
|Sat May 10 23:59:12 1947 PST|@ 14 seconds ago |Sat May 10 23:59:12 1947 PST|@ 14 secs ago
|Sat May 10 23:59:12 1947 PST|@ 1 minute |Sat May 10 23:59:12 1947 PST|@ 1 min
|Sat May 10 23:59:12 1947 PST|@ 5 hours |Sat May 10 23:59:12 1947 PST|@ 5 hours
|Sat May 10 23:59:12 1947 PST|@ 10 days |Sat May 10 23:59:12 1947 PST|@ 10 days
|Sat May 10 23:59:12 1947 PST|@ 3 months |Sat May 10 23:59:12 1947 PST|@ 3 mons
|epoch |@ 14 seconds ago |epoch |@ 14 secs ago
|epoch |@ 1 minute |epoch |@ 1 min
|epoch |@ 5 hours |epoch |@ 5 hours
|epoch |@ 10 days |epoch |@ 10 days
|epoch |@ 3 months |epoch |@ 3 mons
(10 rows) (10 rows)
...@@ -74,9 +74,9 @@ four|f1 ...@@ -74,9 +74,9 @@ four|f1
|<(100,0),100> |<(100,0),100>
(4 rows) (4 rows)
QUERY: SELECT '' as five, c1.f1 AS one, c2.f1 AS two, (c1.f1 <===> c2.f1) AS distance QUERY: SELECT '' as five, c1.f1 AS one, c2.f1 AS two, (c1.f1 <-> c2.f1) AS distance
FROM CIRCLE_TBL c1, CIRCLE_TBL c2 FROM CIRCLE_TBL c1, CIRCLE_TBL c2
WHERE (c1.f1 < c2.f1) AND ((c1.f1 <===> c2.f1) > 0) WHERE (c1.f1 < c2.f1) AND ((c1.f1 <-> c2.f1) > 0)
ORDER BY distance, one, two; ORDER BY distance, one, two;
five|one |two | distance five|one |two | distance
----+--------------+--------------+---------------- ----+--------------+--------------+----------------
......
...@@ -506,29 +506,29 @@ three|abstime |datetime ...@@ -506,29 +506,29 @@ three|abstime |datetime
QUERY: SELECT '' AS ten, f1 AS timespan, reltime( f1) AS reltime QUERY: SELECT '' AS ten, f1 AS timespan, reltime( f1) AS reltime
FROM TIMESPAN_TBL; FROM TIMESPAN_TBL;
ten|timespan |reltime ten|timespan |reltime
---+-----------------------------+---------------- ---+-----------------------------+-----------------------------
|@ 1 min |@ 1 minute |@ 1 min |@ 1 min
|@ 5 hours |@ 5 hours |@ 5 hours |@ 5 hours
|@ 10 days |@ 10 days |@ 10 days |@ 10 days
|@ 34 years |@ 408 months |@ 34 years |@ 34 years
|@ 3 mons |@ 3 months |@ 3 mons |@ 3 mons
|@ 14 secs ago |@ 14 seconds ago |@ 14 secs ago |@ 14 secs ago
|@ 1 day 2 hours 3 mins 4 secs|@ 93784 seconds |@ 1 day 2 hours 3 mins 4 secs|@ 1 day 2 hours 3 mins 4 secs
|@ 6 years |@ 72 months |@ 6 years |@ 6 years
|@ 5 mons |@ 5 months |@ 5 mons |@ 5 mons
|@ 5 mons 12 hours |@ 3612 hours |@ 5 mons 12 hours |@ 5 mons 12 hours
(10 rows) (10 rows)
QUERY: SELECT '' AS six, f1 as reltime, timespan( f1) AS timespan QUERY: SELECT '' AS six, f1 as reltime, timespan( f1) AS timespan
FROM RELTIME_TBL; FROM RELTIME_TBL;
six|reltime |timespan six|reltime |timespan
---+----------------+------------- ---+-------------+-------------
|@ 1 minute |@ 1 min |@ 1 min |@ 1 min
|@ 5 hours |@ 5 hours |@ 5 hours |@ 5 hours
|@ 10 days |@ 10 days |@ 10 days |@ 10 days
|@ 34 years |@ 12410 days |@ 34 years |@ 34 years
|@ 3 months |@ 90 days |@ 3 mons |@ 3 mons
|@ 14 seconds ago|@ 14 secs ago |@ 14 secs ago|@ 14 secs ago
(6 rows) (6 rows)
QUERY: DROP TABLE TEMP_DATETIME; QUERY: DROP TABLE TEMP_DATETIME;
......
...@@ -27,7 +27,7 @@ NOTICE:there is no operator <= for types lseg and lseg ...@@ -27,7 +27,7 @@ NOTICE:there is no operator <= for types lseg and lseg
NOTICE:You will either have to retype this query using an NOTICE:You will either have to retype this query using an
NOTICE:explicit cast, or you will have to define the operator NOTICE:explicit cast, or you will have to define the operator
WARN:<= for lseg and lseg using CREATE OPERATOR WARN:<= for lseg and lseg using CREATE OPERATOR
QUERY: SELECT * FROM LSEG_TBL WHERE (s <===> '[(1,2),(3,4)]'::lseg) < 10; QUERY: SELECT * FROM LSEG_TBL WHERE (s <-> '[(1,2),(3,4)]'::lseg) < 10;
s s
------------------ ------------------
[(1,2),(3,4)] [(1,2),(3,4)]
......
...@@ -22,7 +22,7 @@ six|f1 ...@@ -22,7 +22,7 @@ six|f1
|(10,10) |(10,10)
(6 rows) (6 rows)
QUERY: SELECT '' AS three, p.* FROM POINT_TBL p WHERE p.f1 !< '(0.0, 0.0)'; QUERY: SELECT '' AS three, p.* FROM POINT_TBL p WHERE p.f1 << '(0.0, 0.0)';
three|f1 three|f1
-----+-------- -----+--------
|(-10,0) |(-10,0)
...@@ -30,7 +30,7 @@ three|f1 ...@@ -30,7 +30,7 @@ three|f1
|(-5,-12) |(-5,-12)
(3 rows) (3 rows)
QUERY: SELECT '' AS three, p.* FROM POINT_TBL p WHERE '(0.0,0.0)' !> p.f1; QUERY: SELECT '' AS three, p.* FROM POINT_TBL p WHERE '(0.0,0.0)' >> p.f1;
three|f1 three|f1
-----+-------- -----+--------
|(-10,0) |(-10,0)
...@@ -38,26 +38,26 @@ three|f1 ...@@ -38,26 +38,26 @@ three|f1
|(-5,-12) |(-5,-12)
(3 rows) (3 rows)
QUERY: SELECT '' AS one, p.* FROM POINT_TBL p WHERE '(0.0,0.0)' !^ p.f1; QUERY: SELECT '' AS one, p.* FROM POINT_TBL p WHERE '(0.0,0.0)' >^ p.f1;
one|f1 one|f1
---+-------- ---+--------
|(-5,-12) |(-5,-12)
(1 row) (1 row)
QUERY: SELECT '' AS one, p.* FROM POINT_TBL p WHERE p.f1 !| '(0.0, 0.0)'; QUERY: SELECT '' AS one, p.* FROM POINT_TBL p WHERE p.f1 <^ '(0.0, 0.0)';
one|f1 one|f1
---+-------- ---+--------
|(-5,-12) |(-5,-12)
(1 row) (1 row)
QUERY: SELECT '' AS one, p.* FROM POINT_TBL p WHERE p.f1 =|= '(5.1, 34.5)'; QUERY: SELECT '' AS one, p.* FROM POINT_TBL p WHERE p.f1 ~= '(5.1, 34.5)';
one|f1 one|f1
---+---------- ---+----------
|(5.1,34.5) |(5.1,34.5)
(1 row) (1 row)
QUERY: SELECT '' AS three, p.* FROM POINT_TBL p QUERY: SELECT '' AS three, p.* FROM POINT_TBL p
WHERE p.f1 ===> '(0,0,100,100)'; WHERE p.f1 @ '(0,0,100,100)'::box;
three|f1 three|f1
-----+---------- -----+----------
|(0,0) |(0,0)
...@@ -66,7 +66,7 @@ three|f1 ...@@ -66,7 +66,7 @@ three|f1
(3 rows) (3 rows)
QUERY: SELECT '' AS three, p.* FROM POINT_TBL p QUERY: SELECT '' AS three, p.* FROM POINT_TBL p
WHERE not on_pb(p.f1,'(0,0,100,100)'::box); WHERE not p.f1 @ '(0,0,100,100)'::box;
three|f1 three|f1
-----+-------- -----+--------
|(-10,0) |(-10,0)
...@@ -75,14 +75,14 @@ three|f1 ...@@ -75,14 +75,14 @@ three|f1
(3 rows) (3 rows)
QUERY: SELECT '' AS two, p.* FROM POINT_TBL p QUERY: SELECT '' AS two, p.* FROM POINT_TBL p
WHERE on_ppath(p.f1,'[(0,0),(-10,0),(-10,10)]'::path); WHERE p.f1 @ '[(0,0),(-10,0),(-10,10)]'::path;
two|f1 two|f1
---+------- ---+-------
|(0,0) |(0,0)
|(-10,0) |(-10,0)
(2 rows) (2 rows)
QUERY: SELECT '' AS six, p.f1, p.f1 <===> '(0,0)'::point AS dist QUERY: SELECT '' AS six, p.f1, p.f1 <-> '(0,0)'::point AS dist
FROM POINT_TBL p FROM POINT_TBL p
ORDER BY dist; ORDER BY dist;
six|f1 | dist six|f1 | dist
...@@ -96,7 +96,7 @@ six|f1 | dist ...@@ -96,7 +96,7 @@ six|f1 | dist
(6 rows) (6 rows)
QUERY: SET geqo TO 'off'; QUERY: SET geqo TO 'off';
QUERY: SELECT '' AS thirtysix, p1.f1 AS point1, p2.f1 AS point2, p1.f1 <===> p2.f1 AS dist QUERY: SELECT '' AS thirtysix, p1.f1 AS point1, p2.f1 AS point2, p1.f1 <-> p2.f1 AS dist
FROM POINT_TBL p1, POINT_TBL p2 FROM POINT_TBL p1, POINT_TBL p2
ORDER BY dist; ORDER BY dist;
thirtysix|point1 |point2 | dist thirtysix|point1 |point2 | dist
...@@ -141,7 +141,7 @@ thirtysix|point1 |point2 | dist ...@@ -141,7 +141,7 @@ thirtysix|point1 |point2 | dist
QUERY: SELECT '' AS thirty, p1.f1 AS point1, p2.f1 AS point2 QUERY: SELECT '' AS thirty, p1.f1 AS point1, p2.f1 AS point2
FROM POINT_TBL p1, POINT_TBL p2 FROM POINT_TBL p1, POINT_TBL p2
WHERE (p1.f1 <===> p2.f1) > 3; WHERE (p1.f1 <-> p2.f1) > 3;
thirty|point1 |point2 thirty|point1 |point2
------+----------+---------- ------+----------+----------
|(-10,0) |(0,0) |(-10,0) |(0,0)
...@@ -176,9 +176,9 @@ thirty|point1 |point2 ...@@ -176,9 +176,9 @@ thirty|point1 |point2
|(-5,-12) |(10,10) |(-5,-12) |(10,10)
(30 rows) (30 rows)
QUERY: SELECT '' AS fifteen, p1.f1 AS point1, p2.f1 AS point2, (p1.f1 <===> p2.f1) AS distance QUERY: SELECT '' AS fifteen, p1.f1 AS point1, p2.f1 AS point2, (p1.f1 <-> p2.f1) AS distance
FROM POINT_TBL p1, POINT_TBL p2 FROM POINT_TBL p1, POINT_TBL p2
WHERE (p1.f1 <===> p2.f1) > 3 and p1.f1 !< p2.f1 WHERE (p1.f1 <-> p2.f1) > 3 and p1.f1 << p2.f1
ORDER BY distance; ORDER BY distance;
fifteen|point1 |point2 | distance fifteen|point1 |point2 | distance
-------+----------+----------+---------------- -------+----------+----------+----------------
...@@ -199,9 +199,9 @@ fifteen|point1 |point2 | distance ...@@ -199,9 +199,9 @@ fifteen|point1 |point2 | distance
|(-5,-12) |(5.1,34.5)|47.5842410888311 |(-5,-12) |(5.1,34.5)|47.5842410888311
(15 rows) (15 rows)
QUERY: SELECT '' AS three, p1.f1 AS point1, p2.f1 AS point2, (p1.f1 <===> p2.f1) AS distance QUERY: SELECT '' AS three, p1.f1 AS point1, p2.f1 AS point2, (p1.f1 <-> p2.f1) AS distance
FROM POINT_TBL p1, POINT_TBL p2 FROM POINT_TBL p1, POINT_TBL p2
WHERE (p1.f1 <===> p2.f1) > 3 and p1.f1 !< p2.f1 and p1.f1 !^ p2.f1 WHERE (p1.f1 <-> p2.f1) > 3 and p1.f1 << p2.f1 and p1.f1 >^ p2.f1
ORDER BY distance; ORDER BY distance;
three|point1 |point2 | distance three|point1 |point2 | distance
-----+----------+--------+---------------- -----+----------+--------+----------------
......
...@@ -69,7 +69,7 @@ zero|f1 ...@@ -69,7 +69,7 @@ zero|f1
QUERY: SELECT '' AS one, p.* QUERY: SELECT '' AS one, p.*
FROM POLYGON_TBL p FROM POLYGON_TBL p
WHERE p.f1 @ '(3.0,1.0),(3.0,3.0),(1.0,0.0)'; WHERE p.f1 @ '(3.0,1.0),(3.0,3.0),(1.0,0.0)'::polygon;
one|f1 one|f1
---+------------------- ---+-------------------
|((3,1),(3,3),(1,0)) |((3,1),(3,3),(1,0))
...@@ -77,7 +77,7 @@ one|f1 ...@@ -77,7 +77,7 @@ one|f1
QUERY: SELECT '' AS one, p.* QUERY: SELECT '' AS one, p.*
FROM POLYGON_TBL p FROM POLYGON_TBL p
WHERE p.f1 ~= '(3.0,1.0),(3.0,3.0),(1.0,0.0)'; WHERE p.f1 ~= '(3.0,1.0),(3.0,3.0),(1.0,0.0)'::polygon;
one|f1 one|f1
---+------------------- ---+-------------------
|((3,1),(3,3),(1,0)) |((3,1),(3,3),(1,0))
...@@ -85,7 +85,7 @@ one|f1 ...@@ -85,7 +85,7 @@ one|f1
QUERY: SELECT '' AS one, p.* QUERY: SELECT '' AS one, p.*
FROM POLYGON_TBL p FROM POLYGON_TBL p
WHERE p.f1 ~ '(3.0,1.0),(3.0,3.0),(1.0,0.0)'; WHERE p.f1 ~ '(3.0,1.0),(3.0,3.0),(1.0,0.0)'::polygon;
one|f1 one|f1
---+------------------- ---+-------------------
|((3,1),(3,3),(1,0)) |((3,1),(3,3),(1,0))
......
...@@ -11,42 +11,42 @@ QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago'); ...@@ -11,42 +11,42 @@ QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago');
WARN:Bad reltime external representation '@ 30 eons ago' WARN:Bad reltime external representation '@ 30 eons ago'
QUERY: SELECT '' AS six, RELTIME_TBL.*; QUERY: SELECT '' AS six, RELTIME_TBL.*;
six|f1 six|f1
---+---------------- ---+-------------
|@ 1 minute |@ 1 min
|@ 5 hours |@ 5 hours
|@ 10 days |@ 10 days
|@ 34 years |@ 34 years
|@ 3 months |@ 3 mons
|@ 14 seconds ago |@ 14 secs ago
(6 rows) (6 rows)
QUERY: SELECT '' AS five, RELTIME_TBL.* QUERY: SELECT '' AS five, RELTIME_TBL.*
WHERE RELTIME_TBL.f1 <> '@ 10 days'::reltime; WHERE RELTIME_TBL.f1 <> '@ 10 days'::reltime;
five|f1 five|f1
----+---------------- ----+-------------
|@ 1 minute |@ 1 min
|@ 5 hours |@ 5 hours
|@ 34 years |@ 34 years
|@ 3 months |@ 3 mons
|@ 14 seconds ago |@ 14 secs ago
(5 rows) (5 rows)
QUERY: SELECT '' AS three, RELTIME_TBL.* QUERY: SELECT '' AS three, RELTIME_TBL.*
WHERE RELTIME_TBL.f1 <= '@ 5 hours'::reltime; WHERE RELTIME_TBL.f1 <= '@ 5 hours'::reltime;
three|f1 three|f1
-----+---------------- -----+-------------
|@ 1 minute |@ 1 min
|@ 5 hours |@ 5 hours
|@ 14 seconds ago |@ 14 secs ago
(3 rows) (3 rows)
QUERY: SELECT '' AS three, RELTIME_TBL.* QUERY: SELECT '' AS three, RELTIME_TBL.*
WHERE RELTIME_TBL.f1 < '@ 1 day'::reltime; WHERE RELTIME_TBL.f1 < '@ 1 day'::reltime;
three|f1 three|f1
-----+---------------- -----+-------------
|@ 1 minute |@ 1 min
|@ 5 hours |@ 5 hours
|@ 14 seconds ago |@ 14 secs ago
(3 rows) (3 rows)
QUERY: SELECT '' AS one, RELTIME_TBL.* QUERY: SELECT '' AS one, RELTIME_TBL.*
...@@ -61,18 +61,18 @@ QUERY: SELECT '' AS two, RELTIME_TBL.* ...@@ -61,18 +61,18 @@ QUERY: SELECT '' AS two, RELTIME_TBL.*
two|f1 two|f1
---+---------- ---+----------
|@ 34 years |@ 34 years
|@ 3 months |@ 3 mons
(2 rows) (2 rows)
QUERY: SELECT '' AS five, RELTIME_TBL.* QUERY: SELECT '' AS five, RELTIME_TBL.*
WHERE RELTIME_TBL.f1 > '@ 3 seconds ago'::reltime; WHERE RELTIME_TBL.f1 > '@ 3 seconds ago'::reltime;
five|f1 five|f1
----+---------- ----+----------
|@ 1 minute |@ 1 min
|@ 5 hours |@ 5 hours
|@ 10 days |@ 10 days
|@ 34 years |@ 34 years
|@ 3 months |@ 3 mons
(5 rows) (5 rows)
QUERY: SELECT '' AS fifteen, r1.*, r2.* QUERY: SELECT '' AS fifteen, r1.*, r2.*
...@@ -80,21 +80,21 @@ QUERY: SELECT '' AS fifteen, r1.*, r2.* ...@@ -80,21 +80,21 @@ QUERY: SELECT '' AS fifteen, r1.*, r2.*
WHERE r1.f1 > r2.f1 WHERE r1.f1 > r2.f1
ORDER BY r1.f1, r2.f1; ORDER BY r1.f1, r2.f1;
fifteen|f1 |f1 fifteen|f1 |f1
-------+----------+---------------- -------+----------+-------------
|@ 1 minute|@ 14 seconds ago |@ 1 min |@ 14 secs ago
|@ 5 hours |@ 14 seconds ago |@ 5 hours |@ 14 secs ago
|@ 5 hours |@ 1 minute |@ 5 hours |@ 1 min
|@ 10 days |@ 14 seconds ago |@ 10 days |@ 14 secs ago
|@ 10 days |@ 1 minute |@ 10 days |@ 1 min
|@ 10 days |@ 5 hours |@ 10 days |@ 5 hours
|@ 3 months|@ 14 seconds ago |@ 3 mons |@ 14 secs ago
|@ 3 months|@ 1 minute |@ 3 mons |@ 1 min
|@ 3 months|@ 5 hours |@ 3 mons |@ 5 hours
|@ 3 months|@ 10 days |@ 3 mons |@ 10 days
|@ 34 years|@ 14 seconds ago |@ 34 years|@ 14 secs ago
|@ 34 years|@ 1 minute |@ 34 years|@ 1 min
|@ 34 years|@ 5 hours |@ 34 years|@ 5 hours
|@ 34 years|@ 10 days |@ 34 years|@ 10 days
|@ 34 years|@ 3 months |@ 34 years|@ 3 mons
(15 rows) (15 rows)
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment