aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/postgresql/cases/date.err
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-11-20 17:37:57 +0000
committerGitHub <noreply@github.com>2024-11-20 17:37:57 +0000
commitf76323e9b295c15751e51e3443aa47a36bee8023 (patch)
tree4113c8cad473a33e0f746966e0cf087252fa1d7a /yql/essentials/tests/postgresql/cases/date.err
parent753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff)
parenta7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff)
downloadydb-f76323e9b295c15751e51e3443aa47a36bee8023.tar.gz
Merge pull request #11788 from ydb-platform/mergelibs-241120-1113
Library import 241120-1113
Diffstat (limited to 'yql/essentials/tests/postgresql/cases/date.err')
-rw-r--r--yql/essentials/tests/postgresql/cases/date.err1319
1 files changed, 1319 insertions, 0 deletions
diff --git a/yql/essentials/tests/postgresql/cases/date.err b/yql/essentials/tests/postgresql/cases/date.err
new file mode 100644
index 0000000000..73f287e6fd
--- /dev/null
+++ b/yql/essentials/tests/postgresql/cases/date.err
@@ -0,0 +1,1319 @@
+<sql-statement>
+--
+-- DATE
+--
+CREATE TABLE DATE_TBL (f1 date);
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1957-04-09');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1957-06-13');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1996-02-28');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1996-02-29');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1996-03-01');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1996-03-02');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1997-02-28');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1997-02-29');
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: YtFill!
+ INSERT INTO DATE_TBL VALUES ('1997-02-29');
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "1997-02-29"
+
+ INSERT INTO DATE_TBL VALUES ('1997-02-29');
+ ^
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1997-03-01');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('1997-03-02');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('2000-04-01');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('2000-04-02');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('2000-04-03');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('2038-04-08');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('2039-04-09');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('2040-04-10');
+</sql-statement>
+<sql-statement>
+INSERT INTO DATE_TBL VALUES ('2040-04-10 BC');
+</sql-statement>
+<sql-statement>
+SELECT f1 FROM DATE_TBL;
+</sql-statement>
+<sql-statement>
+SELECT f1 FROM DATE_TBL WHERE f1 < '2000-01-01';
+</sql-statement>
+<sql-statement>
+SELECT f1 FROM DATE_TBL
+ WHERE f1 BETWEEN '2000-01-01' AND '2001-01-01';
+</sql-statement>
+<sql-statement>
+--
+-- Check all the documented input formats
+--
+SET datestyle TO iso; -- display results in ISO
+</sql-statement>
+<sql-statement>
+SET datestyle TO ymd;
+</sql-statement>
+<sql-statement>
+SELECT date 'January 8, 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '1999-01-08';
+</sql-statement>
+<sql-statement>
+SELECT date '1999-01-18';
+</sql-statement>
+<sql-statement>
+SELECT date '1/8/1999';
+</sql-statement>
+<sql-statement>
+SELECT date '1/18/1999';
+</sql-statement>
+<sql-statement>
+SELECT date '18/1/1999';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '18/1/1999';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "18/1/1999"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '18/1/1999';
+ ^
+<sql-statement>
+SELECT date '01/02/03';
+</sql-statement>
+<sql-statement>
+SELECT date '19990108';
+</sql-statement>
+<sql-statement>
+SELECT date '990108';
+</sql-statement>
+<sql-statement>
+SELECT date '1999.008';
+</sql-statement>
+<sql-statement>
+SELECT date 'J2451187';
+</sql-statement>
+<sql-statement>
+SELECT date 'January 8, 99 BC';
+</sql-statement>
+<sql-statement>
+SELECT date '99-Jan-08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-Jan-08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99-Jan-08"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99-Jan-08';
+ ^
+<sql-statement>
+SELECT date '1999-Jan-08';
+</sql-statement>
+<sql-statement>
+SELECT date '08-Jan-99';
+</sql-statement>
+<sql-statement>
+SELECT date '08-Jan-1999';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan-08-99';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan-08-1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99-08-Jan';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-08-Jan';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "99-08-Jan"
+
+ SELECT date '99-08-Jan';
+ ^
+<sql-statement>
+SELECT date '1999-08-Jan';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '1999-08-Jan';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "1999-08-Jan"
+
+ SELECT date '1999-08-Jan';
+ ^
+<sql-statement>
+SELECT date '99 Jan 08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 Jan 08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "99 Jan 08"
+
+ SELECT date '99 Jan 08';
+ ^
+<sql-statement>
+SELECT date '1999 Jan 08';
+</sql-statement>
+<sql-statement>
+SELECT date '08 Jan 99';
+</sql-statement>
+<sql-statement>
+SELECT date '08 Jan 1999';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan 08 99';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan 08 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99 08 Jan';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 08 Jan';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "99 08 Jan"
+
+ SELECT date '99 08 Jan';
+ ^
+<sql-statement>
+SELECT date '1999 08 Jan';
+</sql-statement>
+<sql-statement>
+SELECT date '99-01-08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-01-08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99-01-08"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99-01-08';
+ ^
+<sql-statement>
+SELECT date '1999-01-08';
+</sql-statement>
+<sql-statement>
+SELECT date '08-01-99';
+</sql-statement>
+<sql-statement>
+SELECT date '08-01-1999';
+</sql-statement>
+<sql-statement>
+SELECT date '01-08-99';
+</sql-statement>
+<sql-statement>
+SELECT date '01-08-1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99-08-01';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-08-01';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99-08-01"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99-08-01';
+ ^
+<sql-statement>
+SELECT date '1999-08-01';
+</sql-statement>
+<sql-statement>
+SELECT date '99 01 08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 01 08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99 01 08"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99 01 08';
+ ^
+<sql-statement>
+SELECT date '1999 01 08';
+</sql-statement>
+<sql-statement>
+SELECT date '08 01 99';
+</sql-statement>
+<sql-statement>
+SELECT date '08 01 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '01 08 99';
+</sql-statement>
+<sql-statement>
+SELECT date '01 08 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99 08 01';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 08 01';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99 08 01"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99 08 01';
+ ^
+<sql-statement>
+SELECT date '1999 08 01';
+</sql-statement>
+<sql-statement>
+SET datestyle TO dmy;
+</sql-statement>
+<sql-statement>
+SELECT date 'January 8, 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '1999-01-08';
+</sql-statement>
+<sql-statement>
+SELECT date '1999-01-18';
+</sql-statement>
+<sql-statement>
+SELECT date '1/8/1999';
+</sql-statement>
+<sql-statement>
+SELECT date '1/18/1999';
+</sql-statement>
+<sql-statement>
+SELECT date '18/1/1999';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '18/1/1999';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "18/1/1999"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '18/1/1999';
+ ^
+<sql-statement>
+SELECT date '01/02/03';
+</sql-statement>
+<sql-statement>
+SELECT date '19990108';
+</sql-statement>
+<sql-statement>
+SELECT date '990108';
+</sql-statement>
+<sql-statement>
+SELECT date '1999.008';
+</sql-statement>
+<sql-statement>
+SELECT date 'J2451187';
+</sql-statement>
+<sql-statement>
+SELECT date 'January 8, 99 BC';
+</sql-statement>
+<sql-statement>
+SELECT date '99-Jan-08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-Jan-08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99-Jan-08"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99-Jan-08';
+ ^
+<sql-statement>
+SELECT date '1999-Jan-08';
+</sql-statement>
+<sql-statement>
+SELECT date '08-Jan-99';
+</sql-statement>
+<sql-statement>
+SELECT date '08-Jan-1999';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan-08-99';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan-08-1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99-08-Jan';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-08-Jan';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "99-08-Jan"
+
+ SELECT date '99-08-Jan';
+ ^
+<sql-statement>
+SELECT date '1999-08-Jan';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '1999-08-Jan';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "1999-08-Jan"
+
+ SELECT date '1999-08-Jan';
+ ^
+<sql-statement>
+SELECT date '99 Jan 08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 Jan 08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "99 Jan 08"
+
+ SELECT date '99 Jan 08';
+ ^
+<sql-statement>
+SELECT date '1999 Jan 08';
+</sql-statement>
+<sql-statement>
+SELECT date '08 Jan 99';
+</sql-statement>
+<sql-statement>
+SELECT date '08 Jan 1999';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan 08 99';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan 08 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99 08 Jan';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 08 Jan';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "99 08 Jan"
+
+ SELECT date '99 08 Jan';
+ ^
+<sql-statement>
+SELECT date '1999 08 Jan';
+</sql-statement>
+<sql-statement>
+SELECT date '99-01-08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-01-08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99-01-08"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99-01-08';
+ ^
+<sql-statement>
+SELECT date '1999-01-08';
+</sql-statement>
+<sql-statement>
+SELECT date '08-01-99';
+</sql-statement>
+<sql-statement>
+SELECT date '08-01-1999';
+</sql-statement>
+<sql-statement>
+SELECT date '01-08-99';
+</sql-statement>
+<sql-statement>
+SELECT date '01-08-1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99-08-01';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-08-01';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99-08-01"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99-08-01';
+ ^
+<sql-statement>
+SELECT date '1999-08-01';
+</sql-statement>
+<sql-statement>
+SELECT date '99 01 08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 01 08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99 01 08"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99 01 08';
+ ^
+<sql-statement>
+SELECT date '1999 01 08';
+</sql-statement>
+<sql-statement>
+SELECT date '08 01 99';
+</sql-statement>
+<sql-statement>
+SELECT date '08 01 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '01 08 99';
+</sql-statement>
+<sql-statement>
+SELECT date '01 08 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99 08 01';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 08 01';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99 08 01"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99 08 01';
+ ^
+<sql-statement>
+SELECT date '1999 08 01';
+</sql-statement>
+<sql-statement>
+SET datestyle TO mdy;
+</sql-statement>
+<sql-statement>
+SELECT date 'January 8, 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '1999-01-08';
+</sql-statement>
+<sql-statement>
+SELECT date '1999-01-18';
+</sql-statement>
+<sql-statement>
+SELECT date '1/8/1999';
+</sql-statement>
+<sql-statement>
+SELECT date '1/18/1999';
+</sql-statement>
+<sql-statement>
+SELECT date '18/1/1999';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '18/1/1999';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "18/1/1999"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '18/1/1999';
+ ^
+<sql-statement>
+SELECT date '01/02/03';
+</sql-statement>
+<sql-statement>
+SELECT date '19990108';
+</sql-statement>
+<sql-statement>
+SELECT date '990108';
+</sql-statement>
+<sql-statement>
+SELECT date '1999.008';
+</sql-statement>
+<sql-statement>
+SELECT date 'J2451187';
+</sql-statement>
+<sql-statement>
+SELECT date 'January 8, 99 BC';
+</sql-statement>
+<sql-statement>
+SELECT date '99-Jan-08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-Jan-08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99-Jan-08"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99-Jan-08';
+ ^
+<sql-statement>
+SELECT date '1999-Jan-08';
+</sql-statement>
+<sql-statement>
+SELECT date '08-Jan-99';
+</sql-statement>
+<sql-statement>
+SELECT date '08-Jan-1999';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan-08-99';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan-08-1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99-08-Jan';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-08-Jan';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "99-08-Jan"
+
+ SELECT date '99-08-Jan';
+ ^
+<sql-statement>
+SELECT date '1999-08-Jan';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '1999-08-Jan';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "1999-08-Jan"
+
+ SELECT date '1999-08-Jan';
+ ^
+<sql-statement>
+SELECT date '99 Jan 08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 Jan 08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "99 Jan 08"
+
+ SELECT date '99 Jan 08';
+ ^
+<sql-statement>
+SELECT date '1999 Jan 08';
+</sql-statement>
+<sql-statement>
+SELECT date '08 Jan 99';
+</sql-statement>
+<sql-statement>
+SELECT date '08 Jan 1999';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan 08 99';
+</sql-statement>
+<sql-statement>
+SELECT date 'Jan 08 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99 08 Jan';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 08 Jan';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: invalid input syntax for type date: "99 08 Jan"
+
+ SELECT date '99 08 Jan';
+ ^
+<sql-statement>
+SELECT date '1999 08 Jan';
+</sql-statement>
+<sql-statement>
+SELECT date '99-01-08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-01-08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99-01-08"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99-01-08';
+ ^
+<sql-statement>
+SELECT date '1999-01-08';
+</sql-statement>
+<sql-statement>
+SELECT date '08-01-99';
+</sql-statement>
+<sql-statement>
+SELECT date '08-01-1999';
+</sql-statement>
+<sql-statement>
+SELECT date '01-08-99';
+</sql-statement>
+<sql-statement>
+SELECT date '01-08-1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99-08-01';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99-08-01';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99-08-01"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99-08-01';
+ ^
+<sql-statement>
+SELECT date '1999-08-01';
+</sql-statement>
+<sql-statement>
+SELECT date '99 01 08';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 01 08';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99 01 08"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99 01 08';
+ ^
+<sql-statement>
+SELECT date '1999 01 08';
+</sql-statement>
+<sql-statement>
+SELECT date '08 01 99';
+</sql-statement>
+<sql-statement>
+SELECT date '08 01 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '01 08 99';
+</sql-statement>
+<sql-statement>
+SELECT date '01 08 1999';
+</sql-statement>
+<sql-statement>
+SELECT date '99 08 01';
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '99 08 01';
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date/time field value out of range: "99 08 01"
+HINT: Perhaps you need a different "datestyle" setting.
+
+ SELECT date '99 08 01';
+ ^
+<sql-statement>
+SELECT date '1999 08 01';
+</sql-statement>
+<sql-statement>
+-- Check upper and lower limits of date range
+SELECT date '4714-11-24 BC';
+</sql-statement>
+<sql-statement>
+SELECT date '4714-11-23 BC'; -- out of range
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '4714-11-23 BC'; -- out of range
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date out of range: "4714-11-23 BC"
+
+ SELECT date '4714-11-23 BC'; -- out of range
+ ^
+<sql-statement>
+SELECT date '5874897-12-31';
+</sql-statement>
+<sql-statement>
+SELECT date '5874898-01-01'; -- out of range
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT date '5874898-01-01'; -- out of range
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date out of range: "5874898-01-01"
+
+ SELECT date '5874898-01-01'; -- out of range
+ ^
+<sql-statement>
+RESET datestyle;
+</sql-statement>
+<sql-statement>
+--
+-- Simple math
+-- Leave most of it for the horology tests
+--
+SELECT f1 - date '2000-01-01' AS "Days From 2K" FROM DATE_TBL;
+</sql-statement>
+<sql-statement>
+SELECT f1 - date 'epoch' AS "Days From Epoch" FROM DATE_TBL;
+</sql-statement>
+<sql-statement>
+SELECT date 'yesterday' - date 'today' AS "One day";
+</sql-statement>
+<sql-statement>
+SELECT date 'today' - date 'tomorrow' AS "One day";
+</sql-statement>
+<sql-statement>
+SELECT date 'yesterday' - date 'tomorrow' AS "Two days";
+</sql-statement>
+<sql-statement>
+SELECT date 'tomorrow' - date 'today' AS "One day";
+</sql-statement>
+<sql-statement>
+SELECT date 'today' - date 'yesterday' AS "One day";
+</sql-statement>
+<sql-statement>
+SELECT date 'tomorrow' - date 'yesterday' AS "Two days";
+</sql-statement>
+<sql-statement>
+--
+-- test extract!
+--
+SELECT f1 as "date",
+ date_part('year', f1) AS year,
+ date_part('month', f1) AS month,
+ date_part('day', f1) AS day,
+ date_part('quarter', f1) AS quarter,
+ date_part('decade', f1) AS decade,
+ date_part('century', f1) AS century,
+ date_part('millennium', f1) AS millennium,
+ date_part('isoyear', f1) AS isoyear,
+ date_part('week', f1) AS week,
+ date_part('dow', f1) AS dow,
+ date_part('isodow', f1) AS isodow,
+ date_part('doy', f1) AS doy,
+ date_part('julian', f1) AS julian,
+ date_part('epoch', f1) AS epoch
+ FROM date_tbl;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.date_tbl
+
+<sql-statement>
+--
+-- epoch
+--
+SELECT EXTRACT(EPOCH FROM DATE '1970-01-01'); -- 0
+</sql-statement>
+<sql-statement>
+--
+-- century
+--
+SELECT EXTRACT(CENTURY FROM DATE '0101-12-31 BC'); -- -2
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE '0100-12-31 BC'); -- -1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE '0001-12-31 BC'); -- -1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE '0001-01-01'); -- 1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE '0001-01-01 AD'); -- 1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE '1900-12-31'); -- 19
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE '1901-01-01'); -- 20
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE '2000-12-31'); -- 20
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE '2001-01-01'); -- 21
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM CURRENT_DATE)>=21 AS True; -- true
+</sql-statement>
+<sql-statement>
+--
+-- millennium
+--
+SELECT EXTRACT(MILLENNIUM FROM DATE '0001-12-31 BC'); -- -1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(MILLENNIUM FROM DATE '0001-01-01 AD'); -- 1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(MILLENNIUM FROM DATE '1000-12-31'); -- 1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(MILLENNIUM FROM DATE '1001-01-01'); -- 2
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(MILLENNIUM FROM DATE '2000-12-31'); -- 2
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(MILLENNIUM FROM DATE '2001-01-01'); -- 3
+</sql-statement>
+<sql-statement>
+-- next test to be fixed on the turn of the next millennium;-)
+SELECT EXTRACT(MILLENNIUM FROM CURRENT_DATE); -- 3
+</sql-statement>
+<sql-statement>
+--
+-- decade
+--
+SELECT EXTRACT(DECADE FROM DATE '1994-12-25'); -- 199
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DECADE FROM DATE '0010-01-01'); -- 1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DECADE FROM DATE '0009-12-31'); -- 0
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DECADE FROM DATE '0001-01-01 BC'); -- 0
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DECADE FROM DATE '0002-12-31 BC'); -- -1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DECADE FROM DATE '0011-01-01 BC'); -- -1
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DECADE FROM DATE '0012-12-31 BC'); -- -2
+</sql-statement>
+<sql-statement>
+--
+-- all possible fields
+--
+SELECT EXTRACT(MICROSECONDS FROM DATE '2020-08-11');
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ --
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date units "microseconds" not supported
+
+ --
+ ^
+<sql-statement>
+SELECT EXTRACT(MILLISECONDS FROM DATE '2020-08-11');
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT EXTRACT(MILLISECONDS FROM DATE '2020-08-11');
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date units "milliseconds" not supported
+
+ SELECT EXTRACT(MILLISECONDS FROM DATE '2020-08-11');
+ ^
+<sql-statement>
+SELECT EXTRACT(SECOND FROM DATE '2020-08-11');
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT EXTRACT(SECOND FROM DATE '2020-08-11');
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date units "second" not supported
+
+ SELECT EXTRACT(SECOND FROM DATE '2020-08-11');
+ ^
+<sql-statement>
+SELECT EXTRACT(MINUTE FROM DATE '2020-08-11');
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT EXTRACT(MINUTE FROM DATE '2020-08-11');
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date units "minute" not supported
+
+ SELECT EXTRACT(MINUTE FROM DATE '2020-08-11');
+ ^
+<sql-statement>
+SELECT EXTRACT(HOUR FROM DATE '2020-08-11');
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT EXTRACT(HOUR FROM DATE '2020-08-11');
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date units "hour" not supported
+
+ SELECT EXTRACT(HOUR FROM DATE '2020-08-11');
+ ^
+<sql-statement>
+SELECT EXTRACT(DAY FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(MONTH FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(YEAR FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(YEAR FROM DATE '2020-08-11 BC');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DECADE FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(MILLENNIUM FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(ISOYEAR FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(ISOYEAR FROM DATE '2020-08-11 BC');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(QUARTER FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(WEEK FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DOW FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DOW FROM DATE '2020-08-16');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(ISODOW FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(ISODOW FROM DATE '2020-08-16');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DOY FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(TIMEZONE FROM DATE '2020-08-11');
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT EXTRACT(TIMEZONE FROM DATE '2020-08-11');
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date units "timezone" not supported
+
+ SELECT EXTRACT(TIMEZONE FROM DATE '2020-08-11');
+ ^
+<sql-statement>
+SELECT EXTRACT(TIMEZONE_M FROM DATE '2020-08-11');
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT EXTRACT(TIMEZONE_M FROM DATE '2020-08-11');
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date units "timezone_m" not supported
+
+ SELECT EXTRACT(TIMEZONE_M FROM DATE '2020-08-11');
+ ^
+<sql-statement>
+SELECT EXTRACT(TIMEZONE_H FROM DATE '2020-08-11');
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT EXTRACT(TIMEZONE_H FROM DATE '2020-08-11');
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date units "timezone_h" not supported
+
+ SELECT EXTRACT(TIMEZONE_H FROM DATE '2020-08-11');
+ ^
+<sql-statement>
+SELECT EXTRACT(EPOCH FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(JULIAN FROM DATE '2020-08-11');
+</sql-statement>
+<sql-statement>
+--
+-- test trunc function!
+--
+SELECT DATE_TRUNC('MILLENNIUM', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1001
+</sql-statement>
+<sql-statement>
+SELECT DATE_TRUNC('MILLENNIUM', DATE '1970-03-20'); -- 1001-01-01
+</sql-statement>
+<sql-statement>
+SELECT DATE_TRUNC('CENTURY', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1901
+</sql-statement>
+<sql-statement>
+SELECT DATE_TRUNC('CENTURY', DATE '1970-03-20'); -- 1901
+</sql-statement>
+<sql-statement>
+SELECT DATE_TRUNC('CENTURY', DATE '2004-08-10'); -- 2001-01-01
+</sql-statement>
+<sql-statement>
+SELECT DATE_TRUNC('CENTURY', DATE '0002-02-04'); -- 0001-01-01
+</sql-statement>
+<sql-statement>
+SELECT DATE_TRUNC('CENTURY', DATE '0055-08-10 BC'); -- 0100-01-01 BC
+</sql-statement>
+<sql-statement>
+SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01
+</sql-statement>
+<sql-statement>
+SELECT DATE_TRUNC('DECADE', DATE '0004-12-25'); -- 0001-01-01 BC
+</sql-statement>
+<sql-statement>
+SELECT DATE_TRUNC('DECADE', DATE '0002-12-31 BC'); -- 0011-01-01 BC
+</sql-statement>
+<sql-statement>
+--
+-- test infinity
+--
+select 'infinity'::date, '-infinity'::date;
+</sql-statement>
+<sql-statement>
+select 'infinity'::date > 'today'::date as t;
+</sql-statement>
+<sql-statement>
+select '-infinity'::date < 'today'::date as t;
+</sql-statement>
+<sql-statement>
+select isfinite('infinity'::date), isfinite('-infinity'::date), isfinite('today'::date);
+</sql-statement>
+-stdin-:<main>: Error: Type annotation
+
+ -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem
+ select isfinite('infinity'::date), isfinite('-infinity'::date), isfinite('today'::date);
+ ^
+ -stdin-:<main>:1:1: Error: Duplicated member: isfinite
+ select isfinite('infinity'::date), isfinite('-infinity'::date), isfinite('today'::date);
+ ^
+<sql-statement>
+--
+-- oscillating fields from non-finite date:
+--
+SELECT EXTRACT(DAY FROM DATE 'infinity'); -- NULL
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DAY FROM DATE '-infinity'); -- NULL
+</sql-statement>
+<sql-statement>
+-- all supported fields
+SELECT EXTRACT(DAY FROM DATE 'infinity'); -- NULL
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(MONTH FROM DATE 'infinity'); -- NULL
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(QUARTER FROM DATE 'infinity'); -- NULL
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(WEEK FROM DATE 'infinity'); -- NULL
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DOW FROM DATE 'infinity'); -- NULL
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(ISODOW FROM DATE 'infinity'); -- NULL
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DOY FROM DATE 'infinity'); -- NULL
+</sql-statement>
+<sql-statement>
+--
+-- monotonic fields from non-finite date:
+--
+SELECT EXTRACT(EPOCH FROM DATE 'infinity'); -- Infinity
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(EPOCH FROM DATE '-infinity'); -- -Infinity
+</sql-statement>
+<sql-statement>
+-- all supported fields
+SELECT EXTRACT(YEAR FROM DATE 'infinity'); -- Infinity
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(DECADE FROM DATE 'infinity'); -- Infinity
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(CENTURY FROM DATE 'infinity'); -- Infinity
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(MILLENNIUM FROM DATE 'infinity'); -- Infinity
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(JULIAN FROM DATE 'infinity'); -- Infinity
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(ISOYEAR FROM DATE 'infinity'); -- Infinity
+</sql-statement>
+<sql-statement>
+SELECT EXTRACT(EPOCH FROM DATE 'infinity'); -- Infinity
+</sql-statement>
+<sql-statement>
+--
+-- wrong fields from non-finite date:
+--
+SELECT EXTRACT(MICROSEC FROM DATE 'infinity'); -- error
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ --
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date units "microsec" not recognized
+
+ --
+ ^
+<sql-statement>
+-- test constructors
+select make_date(2013, 7, 15);
+</sql-statement>
+<sql-statement>
+select make_date(-44, 3, 15);
+</sql-statement>
+<sql-statement>
+select make_time(8, 20, 0.0);
+</sql-statement>
+<sql-statement>
+-- should fail
+select make_date(0, 7, 15);
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ -- should fail
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date field value out of range: 0-07-15
+
+ -- should fail
+ ^
+<sql-statement>
+select make_date(2013, 2, 30);
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ select make_date(2013, 2, 30);
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date field value out of range: 2013-02-30
+
+ select make_date(2013, 2, 30);
+ ^
+<sql-statement>
+select make_date(2013, 13, 1);
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ select make_date(2013, 13, 1);
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date field value out of range: 2013-13-01
+
+ select make_date(2013, 13, 1);
+ ^
+<sql-statement>
+select make_date(2013, 11, -1);
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ select make_date(2013, 11, -1);
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: date field value out of range: 2013-11--1
+
+ select make_date(2013, 11, -1);
+ ^
+<sql-statement>
+select make_time(10, 55, 100.1);
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ select make_time(10, 55, 100.1);
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: time field value out of range: 10:55:100.1
+
+ select make_time(10, 55, 100.1);
+ ^
+<sql-statement>
+select make_time(24, 0, 2.1);
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ select make_time(24, 0, 2.1);
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: time field value out of range: 24:00:2.1
+
+ select make_time(24, 0, 2.1);
+ ^