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
......@@ -143,17 +143,17 @@ QUERY: SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
< 'Jan 14 14:00:00 1971'::abstime
ORDER BY abstime, reltime;
ten|abstime |reltime
---+----------------------------+----------------
|Sat May 10 23:59:12 1947 PST|@ 14 seconds ago
|Sat May 10 23:59:12 1947 PST|@ 1 minute
|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|@ 3 months
|epoch |@ 14 seconds ago
|epoch |@ 1 minute
|epoch |@ 5 hours
|epoch |@ 10 days
|epoch |@ 3 months
ten|abstime |reltime
---+----------------------------+-------------
|Sat May 10 23:59:12 1947 PST|@ 14 secs ago
|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|@ 10 days
|Sat May 10 23:59:12 1947 PST|@ 3 mons
|epoch |@ 14 secs ago
|epoch |@ 1 min
|epoch |@ 5 hours
|epoch |@ 10 days
|epoch |@ 3 mons
(10 rows)
......@@ -74,9 +74,9 @@ four|f1
|<(100,0),100>
(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
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;
five|one |two | distance
----+--------------+--------------+----------------
......
......@@ -505,30 +505,30 @@ three|abstime |datetime
QUERY: SELECT '' AS ten, f1 AS timespan, reltime( f1) AS reltime
FROM TIMESPAN_TBL;
ten|timespan |reltime
---+-----------------------------+----------------
|@ 1 min |@ 1 minute
|@ 5 hours |@ 5 hours
|@ 10 days |@ 10 days
|@ 34 years |@ 408 months
|@ 3 mons |@ 3 months
|@ 14 secs ago |@ 14 seconds ago
|@ 1 day 2 hours 3 mins 4 secs|@ 93784 seconds
|@ 6 years |@ 72 months
|@ 5 mons |@ 5 months
|@ 5 mons 12 hours |@ 3612 hours
ten|timespan |reltime
---+-----------------------------+-----------------------------
|@ 1 min |@ 1 min
|@ 5 hours |@ 5 hours
|@ 10 days |@ 10 days
|@ 34 years |@ 34 years
|@ 3 mons |@ 3 mons
|@ 14 secs ago |@ 14 secs ago
|@ 1 day 2 hours 3 mins 4 secs|@ 1 day 2 hours 3 mins 4 secs
|@ 6 years |@ 6 years
|@ 5 mons |@ 5 mons
|@ 5 mons 12 hours |@ 5 mons 12 hours
(10 rows)
QUERY: SELECT '' AS six, f1 as reltime, timespan( f1) AS timespan
FROM RELTIME_TBL;
six|reltime |timespan
---+----------------+-------------
|@ 1 minute |@ 1 min
|@ 5 hours |@ 5 hours
|@ 10 days |@ 10 days
|@ 34 years |@ 12410 days
|@ 3 months |@ 90 days
|@ 14 seconds ago|@ 14 secs ago
six|reltime |timespan
---+-------------+-------------
|@ 1 min |@ 1 min
|@ 5 hours |@ 5 hours
|@ 10 days |@ 10 days
|@ 34 years |@ 34 years
|@ 3 mons |@ 3 mons
|@ 14 secs ago|@ 14 secs ago
(6 rows)
QUERY: DROP TABLE TEMP_DATETIME;
......
......@@ -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:explicit cast, or you will have to define the 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
------------------
[(1,2),(3,4)]
......
......@@ -22,7 +22,7 @@ six|f1
|(10,10)
(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
-----+--------
|(-10,0)
......@@ -30,7 +30,7 @@ three|f1
|(-5,-12)
(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
-----+--------
|(-10,0)
......@@ -38,26 +38,26 @@ three|f1
|(-5,-12)
(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
---+--------
|(-5,-12)
(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
---+--------
|(-5,-12)
(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
---+----------
|(5.1,34.5)
(1 row)
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
-----+----------
|(0,0)
......@@ -66,7 +66,7 @@ three|f1
(3 rows)
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
-----+--------
|(-10,0)
......@@ -75,14 +75,14 @@ three|f1
(3 rows)
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
---+-------
|(0,0)
|(-10,0)
(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
ORDER BY dist;
six|f1 | dist
......@@ -96,7 +96,7 @@ six|f1 | dist
(6 rows)
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
ORDER BY dist;
thirtysix|point1 |point2 | dist
......@@ -141,7 +141,7 @@ thirtysix|point1 |point2 | dist
QUERY: SELECT '' AS thirty, p1.f1 AS point1, p2.f1 AS point2
FROM POINT_TBL p1, POINT_TBL p2
WHERE (p1.f1 <===> p2.f1) > 3;
WHERE (p1.f1 <-> p2.f1) > 3;
thirty|point1 |point2
------+----------+----------
|(-10,0) |(0,0)
......@@ -176,9 +176,9 @@ thirty|point1 |point2
|(-5,-12) |(10,10)
(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
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;
fifteen|point1 |point2 | distance
-------+----------+----------+----------------
......@@ -199,9 +199,9 @@ fifteen|point1 |point2 | distance
|(-5,-12) |(5.1,34.5)|47.5842410888311
(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
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;
three|point1 |point2 | distance
-----+----------+--------+----------------
......
......@@ -69,7 +69,7 @@ zero|f1
QUERY: SELECT '' AS one, 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
---+-------------------
|((3,1),(3,3),(1,0))
......@@ -77,7 +77,7 @@ one|f1
QUERY: SELECT '' AS one, 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
---+-------------------
|((3,1),(3,3),(1,0))
......@@ -85,7 +85,7 @@ one|f1
QUERY: SELECT '' AS one, 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
---+-------------------
|((3,1),(3,3),(1,0))
......
......@@ -10,43 +10,43 @@ WARN:Bad reltime external representation 'badly formatted reltime'
QUERY: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago');
WARN:Bad reltime external representation '@ 30 eons ago'
QUERY: SELECT '' AS six, RELTIME_TBL.*;
six|f1
---+----------------
|@ 1 minute
|@ 5 hours
|@ 10 days
|@ 34 years
|@ 3 months
|@ 14 seconds ago
six|f1
---+-------------
|@ 1 min
|@ 5 hours
|@ 10 days
|@ 34 years
|@ 3 mons
|@ 14 secs ago
(6 rows)
QUERY: SELECT '' AS five, RELTIME_TBL.*
WHERE RELTIME_TBL.f1 <> '@ 10 days'::reltime;
five|f1
----+----------------
|@ 1 minute
|@ 5 hours
|@ 34 years
|@ 3 months
|@ 14 seconds ago
five|f1
----+-------------
|@ 1 min
|@ 5 hours
|@ 34 years
|@ 3 mons
|@ 14 secs ago
(5 rows)
QUERY: SELECT '' AS three, RELTIME_TBL.*
WHERE RELTIME_TBL.f1 <= '@ 5 hours'::reltime;
three|f1
-----+----------------
|@ 1 minute
|@ 5 hours
|@ 14 seconds ago
three|f1
-----+-------------
|@ 1 min
|@ 5 hours
|@ 14 secs ago
(3 rows)
QUERY: SELECT '' AS three, RELTIME_TBL.*
WHERE RELTIME_TBL.f1 < '@ 1 day'::reltime;
three|f1
-----+----------------
|@ 1 minute
|@ 5 hours
|@ 14 seconds ago
three|f1
-----+-------------
|@ 1 min
|@ 5 hours
|@ 14 secs ago
(3 rows)
QUERY: SELECT '' AS one, RELTIME_TBL.*
......@@ -61,40 +61,40 @@ QUERY: SELECT '' AS two, RELTIME_TBL.*
two|f1
---+----------
|@ 34 years
|@ 3 months
|@ 3 mons
(2 rows)
QUERY: SELECT '' AS five, RELTIME_TBL.*
WHERE RELTIME_TBL.f1 > '@ 3 seconds ago'::reltime;
five|f1
----+----------
|@ 1 minute
|@ 1 min
|@ 5 hours
|@ 10 days
|@ 34 years
|@ 3 months
|@ 3 mons
(5 rows)
QUERY: SELECT '' AS fifteen, r1.*, r2.*
FROM RELTIME_TBL r1, RELTIME_TBL r2
WHERE r1.f1 > r2.f1
ORDER BY r1.f1, r2.f1;
fifteen|f1 |f1
-------+----------+----------------
|@ 1 minute|@ 14 seconds ago
|@ 5 hours |@ 14 seconds ago
|@ 5 hours |@ 1 minute
|@ 10 days |@ 14 seconds ago
|@ 10 days |@ 1 minute
|@ 10 days |@ 5 hours
|@ 3 months|@ 14 seconds ago
|@ 3 months|@ 1 minute
|@ 3 months|@ 5 hours
|@ 3 months|@ 10 days
|@ 34 years|@ 14 seconds ago
|@ 34 years|@ 1 minute
|@ 34 years|@ 5 hours
|@ 34 years|@ 10 days
|@ 34 years|@ 3 months
fifteen|f1 |f1
-------+----------+-------------
|@ 1 min |@ 14 secs ago
|@ 5 hours |@ 14 secs ago
|@ 5 hours |@ 1 min
|@ 10 days |@ 14 secs ago
|@ 10 days |@ 1 min
|@ 10 days |@ 5 hours
|@ 3 mons |@ 14 secs ago
|@ 3 mons |@ 1 min
|@ 3 mons |@ 5 hours
|@ 3 mons |@ 10 days
|@ 34 years|@ 14 secs ago
|@ 34 years|@ 1 min
|@ 34 years|@ 5 hours
|@ 34 years|@ 10 days
|@ 34 years|@ 3 mons
(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