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

The Reference Manual should state that the year, month, and day components of a timestamp must be positive integers.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.11.1.1
    • 10.11.1.1
    • Documentation
    • None
    • Normal

    Description

      There is no year 0, month 0, or day 0 in the notation scheme used by Derby timestamps. We should state this in the Reference Guide section titled "TIMESTAMP data type". The following script shows this:

      connect 'jdbc:derby:memory:db;create=true';
      
      create table t( a timestamp );
      
      -- fails because year, month, and day must be positive integers
      insert into t values ( '0000-00-00 00:00:00' );
      insert into t values ( '0001-00-00 00:00:00' );
      insert into t values ( '0001-01-00 00:00:00' );
      
      -- succeeds
      insert into t values ( '0001-01-01 00:00:00' );
      
      select * from t;
      

      Attachments

        1. DERBY-6458.diff
          0.8 kB
          Camilla Haase
        2. rrefsqlj27620.html
          4 kB
          Camilla Haase

        Activity

          People

            chaase3 Camilla Haase
            rhillegas Richard N. Hillegas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: