Derby
  1. Derby
  2. DERBY-4625

TIMESTAMP function doesn't accept nanoseconds

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.5.3.0
    • Fix Version/s: 10.5.3.2, 10.6.2.4, 10.7.1.1
    • Component/s: SQL
    • Labels:
      None

      Description

      The TIMESTAMP function fails if the string argument specifies the number of nanoseconds. It works if the argument is limited to microsecond resolution.

      ij> values timestamp('2010-04-21 12:00:00.123456');
      1
      --------------------------
      2010-04-21 12:00:00.123456

      1 row selected
      ij> values timestamp('2010-04-21 12:00:00.123456789');
      ERROR 22008: '2010-04-21 12:00:00.123456789' is an invalid argument to the timestamp function.

      Since Derby (and JDBC) supports nanosecond resolution, the TIMESTAMP function should also support it.

      1. derby-4625-1.diff
        2 kB
        Nirmal Fernando
      2. derby_4625-2.diff
        4 kB
        Nirmal Fernando

        Issue Links

          Activity

          Knut Anders Hatlen created issue -
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Component/s SQL [ 11408 ]
          Knut Anders Hatlen made changes -
          Link This issue relates to DERBY-4626 [ DERBY-4626 ]
          Knut Anders Hatlen made changes -
          Link This issue is related to DERBY-4614 [ DERBY-4614 ]
          Knut Anders Hatlen made changes -
          Link This issue relates to DERBY-2602 [ DERBY-2602 ]
          Knut Anders Hatlen made changes -
          Description The TIMESTAMP function fails if the string argument specifies the number of nanoseconds. It works if the argument is limited to nanosecond resolution.

          ij> values timestamp('2010-04-21 12:00:00.123456');
          1
          --------------------------
          2010-04-21 12:00:00.123456

          1 row selected
          ij> values timestamp('2010-04-21 12:00:00.123456789');
          ERROR 22008: '2010-04-21 12:00:00.123456789' is an invalid argument to the timestamp function.

          Since Derby (and JDBC) supports nanosecond resolution, the TIMESTAMP function should also support it.
          The TIMESTAMP function fails if the string argument specifies the number of nanoseconds. It works if the argument is limited to microsecond resolution.

          ij> values timestamp('2010-04-21 12:00:00.123456');
          1
          --------------------------
          2010-04-21 12:00:00.123456

          1 row selected
          ij> values timestamp('2010-04-21 12:00:00.123456789');
          ERROR 22008: '2010-04-21 12:00:00.123456789' is an invalid argument to the timestamp function.

          Since Derby (and JDBC) supports nanosecond resolution, the TIMESTAMP function should also support it.
          Nirmal Fernando made changes -
          Assignee C.S. Nirmal J. Fernando [ nirmal ]
          Nirmal Fernando made changes -
          Attachment derby-4625-1.diff [ 12453427 ]
          Nirmal Fernando made changes -
          Attachment derby_4625-2.diff [ 12454845 ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 10.7.0.0 [ 12314971 ]
          Resolution Fixed [ 1 ]
          Rick Hillegas made changes -
          Fix Version/s 10.7.1.1 [ 12315564 ]
          Fix Version/s 10.7.1.0 [ 12314971 ]
          Nirmal Fernando made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Nirmal Fernando made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Issue & fix info [Repro attached]
          Resolution Fixed [ 1 ]
          Kathey Marsden made changes -
          Link This issue is required by DERBY-4994 [ DERBY-4994 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Kathey Marsden made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Mike Matrigali made changes -
          Assignee C.S. Nirmal J. Fernando [ nirmal ] Mike Matrigali [ mikem ]
          Mike Matrigali made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Assignee Mike Matrigali [ mikem ] C.S. Nirmal J. Fernando [ nirmal ]
          Fix Version/s 10.6.2.1 [ 12315343 ]
          Fix Version/s 10.5.3.0 [ 12314117 ]
          Resolution Fixed [ 1 ]
          Mike Matrigali made changes -
          Fix Version/s 10.5.3.2 [ 12315436 ]
          Fix Version/s 10.6.2.3 [ 12315434 ]
          Fix Version/s 10.5.3.0 [ 12314117 ]
          Fix Version/s 10.6.2.1 [ 12315343 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow jira [ 12508972 ] Default workflow, editable Closed status [ 12801116 ]

            People

            • Assignee:
              Nirmal Fernando
              Reporter:
              Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development