diff options
author | Thomas G. Lockhart <lockhart@fourpalms.org> | 1997-07-01 00:34:34 +0000 |
---|---|---|
committer | Thomas G. Lockhart <lockhart@fourpalms.org> | 1997-07-01 00:34:34 +0000 |
commit | 48b5432769d302768c0a869e579a916243ec1374 (patch) | |
tree | a478f4366f10f0fd0adf270952861b8e9174f139 | |
parent | 3ded6fd5117a272220cad7b3687bee7b442d27e7 (diff) | |
download | postgresql-48b5432769d302768c0a869e579a916243ec1374.tar.gz |
Include tests for DateStyle output format variations.
-rw-r--r-- | src/test/regress/sql/horology.sql | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/test/regress/sql/horology.sql b/src/test/regress/sql/horology.sql index bd06dda52c..91764702dc 100644 --- a/src/test/regress/sql/horology.sql +++ b/src/test/regress/sql/horology.sql @@ -147,3 +147,61 @@ RESET DateStyle; SHOW DateStyle; +-- +-- formats +-- + +SET DateStyle TO 'US,Postgres'; + +SHOW DateStyle; + +SELECT '' AS sixty_two, d1 AS us_postgres FROM DATETIME_TBL; + +SELECT '' AS eight, f1 AS us_postgres FROM ABSTIME_TBL; + +SET DateStyle TO 'US,ISO'; + +SELECT '' AS sixty_two, d1 AS us_iso FROM DATETIME_TBL; + +SELECT '' AS eight, f1 AS us_iso FROM ABSTIME_TBL; + +SET DateStyle TO 'US,SQL'; + +SHOW DateStyle; + +SELECT '' AS sixty_two, d1 AS us_sql FROM DATETIME_TBL; + +SELECT '' AS eight, f1 AS us_sql FROM ABSTIME_TBL; + +SET DateStyle TO 'European,Postgres'; + +SHOW DateStyle; + +INSERT INTO DATETIME_TBL VALUES('13/06/1957'); + +SELECT count(*) as one FROM DATETIME_TBL WHERE d1 = 'Jun 13 1957'; + +SELECT '' AS sixty_three, d1 AS european_postgres FROM DATETIME_TBL; + +SELECT '' AS eight, f1 AS european_postgres FROM ABSTIME_TBL; + +SET DateStyle TO 'European,ISO'; + +SHOW DateStyle; + +SELECT '' AS sixty_three, d1 AS european_iso FROM DATETIME_TBL; + +SELECT '' AS eight, f1 AS european_iso FROM ABSTIME_TBL; + +SET DateStyle TO 'European,SQL'; + +SHOW DateStyle; + +SELECT '' AS sixty_three, d1 AS european_sql FROM DATETIME_TBL; + +SELECT '' AS eight, f1 AS european_sql FROM ABSTIME_TBL; + +RESET DateStyle; + +SHOW DateStyle; + |