Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-17376

Sql. Investigate of support default value for TIMESTAMP WITH LOCAL TIME ZONE type 

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • sql

    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

          Activity

            People

              Unassigned Unassigned
              korlov Konstantin Orlov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: