Skip to content
Snippets Groups Projects
Commit e4dc4d11 authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Sergey Kaplun
Browse files

sql: forbid non-integer values in datetime

The patch forbids using non-integer values in datetime's `:set()`
for `year`, `month`, `day`, `hour`, `min`, `sec`, `usec`, `msec`,
`nsec` and `tzoffset` keys. `timestamp` can be double, and integer
values allowed in timestamp if `nsec`, `usec`, or `msecs`
provided. An error will be raised when a value of incorrect type
is passed.

Fixes #10391

@TarantoolBot document
Title: Update types of datetime values passed to SQL's `CAST();`

`CAST` can accept only integer values for `year`, `month`, `day`,
`hour`, `min`, `sec`, `usec`, `msec`, `nsec` and `tzoffset`.
`timestamp` can be integer or double.

(cherry picked from commit f57be571b5e4cc8d57c7e97c15b52df37ad6f12c)
parent 72c3376f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment