-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL: change the default precision for CURRENT_TIMESTAMP #39288
Comments
Pinging @elastic/es-search |
In my opinion we should change the behaviour, as for example PostgreSQL behaves like:
oracle and sqlserver seems to behave also the same way: https://docs.microsoft.com/en-us/sql/t-sql/functions/current-timestamp-transact-sql?view=sql-server-2017#a-get-the-current-system-date-and-time MySQL on the other hand seems to return by default only seconds. |
I would also favor one of the two solutions: present meaningful millis with precision 3, or stop at seconds with default precision 0. |
It seems to me that there's no clear rule regarding precision and it's to the operating system/implementation. On one hand I like the default precision (0 in this case) however I can see how, based on the existing behavior, the millis are expected hence why I propose to change, for current_timestamp, the precision to 3. |
For
CURRENT_TIMESTAMP
function at the moment we have the following documentation example:Which isn't entirely correct, because the lack of a precision, defaults it to
0
. The0
precision means no milliseconds are returned.The text was updated successfully, but these errors were encountered: