diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
commit | 31773f157bf8164364649b5f470f52dece0a4317 (patch) | |
tree | 33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/postgresql/initscripts/timestamptz_tbl.sql | |
parent | 2c7938962d8689e175574fc1e817c05049f27905 (diff) | |
parent | eff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff) | |
download | ydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz |
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/postgresql/initscripts/timestamptz_tbl.sql')
-rw-r--r-- | yql/essentials/tests/postgresql/initscripts/timestamptz_tbl.sql | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/yql/essentials/tests/postgresql/initscripts/timestamptz_tbl.sql b/yql/essentials/tests/postgresql/initscripts/timestamptz_tbl.sql new file mode 100644 index 0000000000..0b31853462 --- /dev/null +++ b/yql/essentials/tests/postgresql/initscripts/timestamptz_tbl.sql @@ -0,0 +1,78 @@ +CREATE TABLE TIMESTAMPTZ_TBL (d1 timestamp(2) with time zone); + +-- TODO: this script isn't fully ok until YQL-17942 gets fixed +INSERT INTO TIMESTAMPTZ_TBL VALUES ('-infinity'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('infinity'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('epoch'); +-- Postgres v6.0 standard output format +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST'); +-- Variations on Postgres v6.1 standard output format +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.4 1997 PST'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.5 1997 PST'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.6 1997 PST'); +-- ISO 8601 format +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02 03:04:05'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-08'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-0800'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 -08:00'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 -0800'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 17:32:01 -07:00'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('2001-09-22T18:19:20'); +-- POSIX format (note that the timezone abbrev is just decoration here) +INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 08:14:01 GMT+8'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 13:14:02 GMT-1'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT-2'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 PST+8'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 MST+7:00'); +-- Variations for acceptable input formats +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997 -0800'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 5:32PM 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997/02/10 17:32:01-0800'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 PST'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb-10-1997 17:32:01 PST'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('02-10-1997 17:32:01 PST'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 PST'); +set datestyle to ymd; +INSERT INTO TIMESTAMPTZ_TBL VALUES ('97FEB10 5:32:01PM UTC'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('97/02/10 17:32:01 UTC'); +reset datestyle; +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997.041 17:32:01 UTC'); +-- timestamps at different timezones +INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 America/New_York'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America/New_York'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 18:32:01 PDT'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 11 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 12 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 13 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 14 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 15 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097 BC'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0597'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1097'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1697'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1797'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1897'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 2097'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1996'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1996'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1996'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1996'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1996'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1997'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1999'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2000'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 2000'); +INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2001'); + |