Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5837

Add support for SQL standard DATE, TIME, TIMESTAMP literals

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.8.2.2
    • Fix Version/s: None
    • Component/s: SQL
    • Urgency:
      Normal

      Description

      The SQL standard 1992 specifies <datetime literals> as such:

      <datetime literal> ::=
      <date literal>

      <time literal>
      <timestamp literal>

      <date literal> ::=
      DATE <date string>

      <time literal> ::=
      TIME <time string>

      <timestamp literal> ::=
      TIMESTAMP <timestamp string>

      <date string> ::=
      <quote> <date value> <quote>

      <time string> ::=
      <quote> <time value> [ <time zone interval> ] <quote>

      <timestamp string> ::=
      <quote> <date value> <space> <time value> [ <time zone interval> ] <quote>

      Taken from:
      http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

      This seems not to be supported directly by Derby. Instead, Derby supports functions for constructing DATE, TIME, TIMESTAMP values. For example:
      http://db.apache.org/derby/docs/dev/ref/rreftimestampfunc.html

      For increased compatibility, it would be nice if literals were implemented according to the standard. In essence, the function's parentheses could be made optional

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lukas.eder Lukas Eder
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: