Description
Currently default value is not supported for columns with type TIMESTAMP WITH LOCAL TIME ZONE, because behaviour is not clear:
- if default value literal MUST contain time zone, then sql parser should be extended to provide ability to specify timestamp with time zone literal
- if default value literal MAY NOT contain time zone, then some research is needed. Consider the following case:
CREATE TABLE t (id INT PRIMARY KEY, val TIMESTAMP WITH LOCAL TIME ZONE DEFAULT TIMESTAMP '2021-01-01 01:01:01')
Which timezone should be chosen for converting this literal to UTC: timezone of the server or timezone of the client who create this table? Should the inserted values be the same in case the user inserts values explicitly or implicitly (though DEFAULT) like that:
INSERT INTO t (id) VALUES (0);
VS
INSERT INTO t (id, val) VALUES (0, DEFAULT);
VS
INSERT INTO t (id, val) VALUES (0, TIMESTAMP '2021-01-01 01:01:01');
Let's provide some research on this topic and chose the proper way to address the issue.
Attachments
Issue Links
- is part of
-
IGNITE-22337 Support CURRENT_DATE/LOCAL_TIME/NOW as functional default
- Open
- is related to
-
IGNITE-19274 Sql. Jdbc client. Support TIMESTAMP WITH LOCAL TIME ZONE type
- Resolved