diff options
author | Monty <monty@mariadb.org> | 2021-01-24 23:56:43 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-05-19 22:54:12 +0200 |
commit | 81d9bed3a492c21fae0d821fd65bae5078a85be3 (patch) | |
tree | b8333fd4ae8589136498b3a431d1e00f886924d2 /sql/share | |
parent | cf93209c70bb0819dd957af1f4e5ca0019a25c4d (diff) | |
download | mariadb-git-81d9bed3a492c21fae0d821fd65bae5078a85be3.tar.gz |
MDEV-20017 Implement TO_CHAR() Oracle compatible function
TO_CHAR(expr, fmt)
- expr: required parameter, data/time/timestamp type expression
- fmt: optional parameter, format string, supports
YYYY/YYY/YY/RRRR/RR/MM/MON/MONTH/MI/DD/DY/HH/HH12/HH24/SS and special
characters. The default value is "YYYY-MM-DD HH24:MI:SS"
In Oracle, TO_CHAR() can also be used to convert numbers to strings, but
this is not supported. This will gave an error in this patch.
Other things:
- If format strings is a constant, it's evaluated only once and if there
is any errors in it, they are given at once and the statement will abort.
Original author: woqutech
Lots of optimizations and cleanups done as part of review
Diffstat (limited to 'sql/share')
-rw-r--r-- | sql/share/errmsg-utf8.txt | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 5ead22ec746..1c56f81b12c 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7988,5 +7988,3 @@ ER_JSON_TABLE_MULTIPLE_MATCHES eng "Can't store multiple matches of the path in the column '%s' of JSON_TABLE '%s'." ER_WITH_TIES_NEEDS_ORDER eng "FETCH ... WITH TIES requires ORDER BY clause to be present" -ER_FUNCTION_CANNOT_BE_USED_IN_CLAUSE - eng "Function '%s' cannot be used in the %s clause" |