mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
I suspect that there is no longer a need for a platform-
specific version of this result, now that tintervals actually sort correctly. We can always add it back if NetBSD really is different.
This commit is contained in:
parent
99d3e27112
commit
94e37a30da
@ -1,154 +0,0 @@
|
||||
QUERY: CREATE TABLE TINTERVAL_TBL (f1 tinterval);
|
||||
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
||||
VALUES ('["-infinity" "infinity"]');
|
||||
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
||||
VALUES ('["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]');
|
||||
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
||||
VALUES ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]');
|
||||
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
||||
VALUES ('["epoch" "Mon May 1 00:30:30 1995"]');
|
||||
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
||||
VALUES ('["Feb 15 1990 12:15:03" "current"]');
|
||||
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
||||
VALUES ('["bad time specifications" ""]');
|
||||
ERROR: Bad abstime external representation 'bad time specifications'
|
||||
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
||||
VALUES ('["" "infinity"]');
|
||||
ERROR: Bad abstime external representation ''
|
||||
QUERY: SELECT '' AS five, TINTERVAL_TBL.*;
|
||||
five|f1
|
||||
----+---------------------------------------------------------------
|
||||
|["-infinity" "infinity"]
|
||||
|["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||
(5 rows)
|
||||
|
||||
QUERY: SELECT '' AS one, t.*
|
||||
FROM TINTERVAL_TBL t
|
||||
WHERE t.f1 #= '@ 1 months';
|
||||
one|f1
|
||||
---+---------------------------------------------------------------
|
||||
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
(1 row)
|
||||
|
||||
QUERY: SELECT '' AS three, t.*
|
||||
FROM TINTERVAL_TBL t
|
||||
WHERE t.f1 #<> '@ 1 months';
|
||||
three|f1
|
||||
-----+---------------------------------------------------------------
|
||||
|["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||
(3 rows)
|
||||
|
||||
QUERY: SELECT '' AS zero, t.*
|
||||
FROM TINTERVAL_TBL t
|
||||
WHERE t.f1 #< '@ 1 month';
|
||||
zero|f1
|
||||
----+--
|
||||
(0 rows)
|
||||
|
||||
QUERY: SELECT '' AS one, t.*
|
||||
FROM TINTERVAL_TBL t
|
||||
WHERE t.f1 #<= '@ 1 month';
|
||||
one|f1
|
||||
---+---------------------------------------------------------------
|
||||
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
(1 row)
|
||||
|
||||
QUERY: SELECT '' AS three, t.*
|
||||
FROM TINTERVAL_TBL t
|
||||
WHERE t.f1 #> '@ 1 year';
|
||||
three|f1
|
||||
-----+---------------------------------------------------------------
|
||||
|["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||
(3 rows)
|
||||
|
||||
QUERY: SELECT '' AS three, t.*
|
||||
FROM TINTERVAL_TBL t
|
||||
WHERE t.f1 #>= '@ 3 years';
|
||||
three|f1
|
||||
-----+---------------------------------------------------------------
|
||||
|["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||
(3 rows)
|
||||
|
||||
QUERY: SELECT '' AS three, t1.*
|
||||
FROM TINTERVAL_TBL t1
|
||||
WHERE t1.f1 &&
|
||||
'["Aug 15 14:23:19 1983" "Sep 16 14:23:19 1983"]'::tinterval;
|
||||
three|f1
|
||||
-----+---------------------------------------------------------------
|
||||
|["-infinity" "infinity"]
|
||||
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
(3 rows)
|
||||
|
||||
QUERY: SET geqo TO 'off';
|
||||
QUERY: SELECT '' AS five, t1.f1, t2.f1
|
||||
FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2
|
||||
WHERE t1.f1 && t2.f1 and
|
||||
t1.f1 = t2.f1
|
||||
ORDER BY t1.f1, t2.f1;
|
||||
five|f1 |f1
|
||||
----+---------------------------------------------------------------+---------------------------------------------------------------
|
||||
|["-infinity" "infinity"] |["-infinity" "infinity"]
|
||||
|["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]|["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
|["Thu Feb 15 12:15:03 1990 PST" "current"] |["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||
(5 rows)
|
||||
|
||||
QUERY: SELECT '' AS fourteen, t1.f1 AS interval1, t2.f1 AS interval2
|
||||
FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2
|
||||
WHERE t1.f1 && t2.f1 and not t1.f1 = t2.f1
|
||||
ORDER BY interval1, interval2;
|
||||
fourteen|interval1 |interval2
|
||||
--------+---------------------------------------------------------------+---------------------------------------------------------------
|
||||
|["-infinity" "infinity"] |["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["-infinity" "infinity"] |["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
|["-infinity" "infinity"] |["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||
|["-infinity" "infinity"] |["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||
|["Thu Feb 15 12:15:03 1990 PST" "current"] |["-infinity" "infinity"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["-infinity" "infinity"]
|
||||
|["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]|["-infinity" "infinity"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||
|["Thu Feb 15 12:15:03 1990 PST" "current"] |["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]|["-infinity" "infinity"]
|
||||
(14 rows)
|
||||
|
||||
QUERY: SELECT '' AS five, t1.f1
|
||||
FROM TINTERVAL_TBL t1
|
||||
WHERE not t1.f1 <<
|
||||
'["Aug 15 14:23:19 1980" "Sep 16 14:23:19 1990"]'::tinterval
|
||||
ORDER BY t1.f1;
|
||||
five|f1
|
||||
----+---------------------------------------------------------------
|
||||
|["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||
(3 rows)
|
||||
|
||||
QUERY: SELECT '' AS three, t1.f1
|
||||
FROM TINTERVAL_TBL t1
|
||||
WHERE t1.f1 &&
|
||||
('Aug 15 14:23:19 1983'::abstime <#>
|
||||
'Sep 16 14:23:19 1983'::abstime)
|
||||
ORDER BY t1.f1;
|
||||
three|f1
|
||||
-----+---------------------------------------------------------------
|
||||
|["-infinity" "infinity"]
|
||||
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
(3 rows)
|
||||
|
||||
QUERY: RESET geqo;
|
Loading…
Reference in New Issue
Block a user