summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/horology.out15
-rw-r--r--src/test/regress/sql/horology.sql4
2 files changed, 19 insertions, 0 deletions
diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out
index 7d11f251584..b00ab0f142c 100644
--- a/src/test/regress/expected/horology.out
+++ b/src/test/regress/expected/horology.out
@@ -3128,6 +3128,21 @@ SELECT to_date('2011 12 18', 'YYYY MM DD');
12-18-2011
(1 row)
+SELECT to_date('2011 12 18', 'YYYYxMMxDD');
+ to_date
+------------
+ 12-18-2011
+(1 row)
+
+SELECT to_date('2011x 12x 18', 'YYYYxMMxDD');
+ to_date
+------------
+ 12-18-2011
+(1 row)
+
+SELECT to_date('2011 x12 x18', 'YYYYxMMxDD');
+ERROR: invalid value "x1" for "MM"
+DETAIL: Value must be an integer.
--
-- Check errors for some incorrect usages of to_timestamp() and to_date()
--
diff --git a/src/test/regress/sql/horology.sql b/src/test/regress/sql/horology.sql
index 807037be76e..ca34e8753de 100644
--- a/src/test/regress/sql/horology.sql
+++ b/src/test/regress/sql/horology.sql
@@ -495,6 +495,10 @@ SELECT to_date('2011 12 18', 'YYYY MM DD');
SELECT to_date('2011 12 18', 'YYYY MM DD');
SELECT to_date('2011 12 18', 'YYYY MM DD');
+SELECT to_date('2011 12 18', 'YYYYxMMxDD');
+SELECT to_date('2011x 12x 18', 'YYYYxMMxDD');
+SELECT to_date('2011 x12 x18', 'YYYYxMMxDD');
+
--
-- Check errors for some incorrect usages of to_timestamp() and to_date()
--