diff options
author | Thomas G. Lockhart | 1997-06-23 15:05:52 +0000 |
---|---|---|
committer | Thomas G. Lockhart | 1997-06-23 15:05:52 +0000 |
commit | 89abee4691f9bd50666b3bbf854539876124e50c (patch) | |
tree | 3a51d20a946e75c2fe9c56583d1f0eba363707ce | |
parent | 45409f0cdd2caefef2c284ccc5fa0c4b0613a19d (diff) |
Test the "SET DateStyle TO..." date formatting modes.
-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 bf772e46249..bd06dda52c0 100644 --- a/src/test/regress/sql/horology.sql +++ b/src/test/regress/sql/horology.sql @@ -89,3 +89,61 @@ SELECT '' AS six, f1 as reltime, timespan( f1) AS timespan DROP TABLE TEMP_DATETIME; +-- +-- 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; + |