You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (Created) (JIRA)" <ji...@apache.org> on 2012/02/02 04:37:54 UTC

[jira] [Created] (DERBY-5596) TIMESTAMP doc gives wrong precision limitation

TIMESTAMP doc gives wrong precision limitation
----------------------------------------------

                 Key: DERBY-5596
                 URL: https://issues.apache.org/jira/browse/DERBY-5596
             Project: Derby
          Issue Type: Bug
          Components: Documentation
            Reporter: Dag H. Wanvik


Derby accepts nanosecond fractions. e,g.

create table t(i timestamp);
insert into t values TIMESTAMP('1962-09-23 03:23:34.123456789');

but the refman doc states:

> Derby supports the following formats for TIMESTAMP:
>
> yyyy-mm-dd hh:mm:ss[.nnnnnn]
> yyyy-mm-dd-hh.mm.ss[.nnnnnn]
>
> The first of the two formats above is the java.sql.Timestamp format.
>
>The year must always have four digits. Months, days, and hours may have one or two digits. Minutes and seconds must have two digits. 
>Nanoseconds, if present, may have between one and six digits.

Nine digits are accepted, not six:

select * from t;
I                            
-----------------------------
1962-09-23 03:23:34.123456789


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (DERBY-5596) TIMESTAMP doc gives wrong precision limitation

Posted by "Kim Haase (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim Haase closed DERBY-5596.
----------------------------


Fix has appeared in Latest Alpha Manuals.
                
> TIMESTAMP doc gives wrong precision limitation
> ----------------------------------------------
>
>                 Key: DERBY-5596
>                 URL: https://issues.apache.org/jira/browse/DERBY-5596
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.8.2.2
>            Reporter: Dag H. Wanvik
>            Assignee: Kim Haase
>             Fix For: 10.9.0.0
>
>         Attachments: DERBY-5596.diff, rrefsqlj27620.html
>
>
> Derby accepts nanosecond fractions. e,g.
> create table t(i timestamp);
> insert into t values TIMESTAMP('1962-09-23 03:23:34.123456789');
> but the refman doc states:
> > Derby supports the following formats for TIMESTAMP:
> >
> > yyyy-mm-dd hh:mm:ss[.nnnnnn]
> > yyyy-mm-dd-hh.mm.ss[.nnnnnn]
> >
> > The first of the two formats above is the java.sql.Timestamp format.
> >
> >The year must always have four digits. Months, days, and hours may have one or two digits. Minutes and seconds must have two digits. 
> >Nanoseconds, if present, may have between one and six digits.
> Nine digits are accepted, not six:
> select * from t;
> I                            
> -----------------------------
> 1962-09-23 03:23:34.123456789

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5596) TIMESTAMP doc gives wrong precision limitation

Posted by "Rick Hillegas (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248417#comment-13248417 ] 

Rick Hillegas commented on DERBY-5596:
--------------------------------------

Hi Kim,

Thanks for making these changes. I don't know a handy name for the other format. Documentation for the two formats goes back to 10.1. The formats don't appear in the 10.0 reference guide. I think it's ok for the other format to not have a handy name. +1 to these changes.
                
> TIMESTAMP doc gives wrong precision limitation
> ----------------------------------------------
>
>                 Key: DERBY-5596
>                 URL: https://issues.apache.org/jira/browse/DERBY-5596
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.8.2.2
>            Reporter: Dag H. Wanvik
>            Assignee: Kim Haase
>         Attachments: DERBY-5596.diff, rrefsqlj27620.html
>
>
> Derby accepts nanosecond fractions. e,g.
> create table t(i timestamp);
> insert into t values TIMESTAMP('1962-09-23 03:23:34.123456789');
> but the refman doc states:
> > Derby supports the following formats for TIMESTAMP:
> >
> > yyyy-mm-dd hh:mm:ss[.nnnnnn]
> > yyyy-mm-dd-hh.mm.ss[.nnnnnn]
> >
> > The first of the two formats above is the java.sql.Timestamp format.
> >
> >The year must always have four digits. Months, days, and hours may have one or two digits. Minutes and seconds must have two digits. 
> >Nanoseconds, if present, may have between one and six digits.
> Nine digits are accepted, not six:
> select * from t;
> I                            
> -----------------------------
> 1962-09-23 03:23:34.123456789

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DERBY-5596) TIMESTAMP doc gives wrong precision limitation

Posted by "Kim Haase (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim Haase resolved DERBY-5596.
------------------------------

       Resolution: Fixed
    Fix Version/s: 10.9.0.0

Thanks, Rick! If no one's asked the question before, there's no need to answer it. 

Committed patch DERBY-5596.diff to documentation trunk at revision 1310489. 

                
> TIMESTAMP doc gives wrong precision limitation
> ----------------------------------------------
>
>                 Key: DERBY-5596
>                 URL: https://issues.apache.org/jira/browse/DERBY-5596
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.8.2.2
>            Reporter: Dag H. Wanvik
>            Assignee: Kim Haase
>             Fix For: 10.9.0.0
>
>         Attachments: DERBY-5596.diff, rrefsqlj27620.html
>
>
> Derby accepts nanosecond fractions. e,g.
> create table t(i timestamp);
> insert into t values TIMESTAMP('1962-09-23 03:23:34.123456789');
> but the refman doc states:
> > Derby supports the following formats for TIMESTAMP:
> >
> > yyyy-mm-dd hh:mm:ss[.nnnnnn]
> > yyyy-mm-dd-hh.mm.ss[.nnnnnn]
> >
> > The first of the two formats above is the java.sql.Timestamp format.
> >
> >The year must always have four digits. Months, days, and hours may have one or two digits. Minutes and seconds must have two digits. 
> >Nanoseconds, if present, may have between one and six digits.
> Nine digits are accepted, not six:
> select * from t;
> I                            
> -----------------------------
> 1962-09-23 03:23:34.123456789

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5596) TIMESTAMP doc gives wrong precision limitation

Posted by "Kim Haase (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim Haase updated DERBY-5596:
-----------------------------

    Attachment: rrefsqlj27620.html
                DERBY-5596.diff

Since we keep getting questions about this, now seems a good time to fix it.

I'm attaching DERBY-5596.diff and rrefsqlj27620.html, with modifications to the "TIMESTAMP data type" topic. Please let me know if changes are needed. 

I do have one question. Below the syntax it says, "The first of the two formats above is the java.sql.Timestamp format." One naturally wonders, what is the second format? Do we have an answer?
                
> TIMESTAMP doc gives wrong precision limitation
> ----------------------------------------------
>
>                 Key: DERBY-5596
>                 URL: https://issues.apache.org/jira/browse/DERBY-5596
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.8.2.2
>            Reporter: Dag H. Wanvik
>            Assignee: Kim Haase
>         Attachments: DERBY-5596.diff, rrefsqlj27620.html
>
>
> Derby accepts nanosecond fractions. e,g.
> create table t(i timestamp);
> insert into t values TIMESTAMP('1962-09-23 03:23:34.123456789');
> but the refman doc states:
> > Derby supports the following formats for TIMESTAMP:
> >
> > yyyy-mm-dd hh:mm:ss[.nnnnnn]
> > yyyy-mm-dd-hh.mm.ss[.nnnnnn]
> >
> > The first of the two formats above is the java.sql.Timestamp format.
> >
> >The year must always have four digits. Months, days, and hours may have one or two digits. Minutes and seconds must have two digits. 
> >Nanoseconds, if present, may have between one and six digits.
> Nine digits are accepted, not six:
> select * from t;
> I                            
> -----------------------------
> 1962-09-23 03:23:34.123456789

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (DERBY-5596) TIMESTAMP doc gives wrong precision limitation

Posted by "Kim Haase (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim Haase reassigned DERBY-5596:
--------------------------------

    Assignee: Kim Haase
    
> TIMESTAMP doc gives wrong precision limitation
> ----------------------------------------------
>
>                 Key: DERBY-5596
>                 URL: https://issues.apache.org/jira/browse/DERBY-5596
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Dag H. Wanvik
>            Assignee: Kim Haase
>
> Derby accepts nanosecond fractions. e,g.
> create table t(i timestamp);
> insert into t values TIMESTAMP('1962-09-23 03:23:34.123456789');
> but the refman doc states:
> > Derby supports the following formats for TIMESTAMP:
> >
> > yyyy-mm-dd hh:mm:ss[.nnnnnn]
> > yyyy-mm-dd-hh.mm.ss[.nnnnnn]
> >
> > The first of the two formats above is the java.sql.Timestamp format.
> >
> >The year must always have four digits. Months, days, and hours may have one or two digits. Minutes and seconds must have two digits. 
> >Nanoseconds, if present, may have between one and six digits.
> Nine digits are accepted, not six:
> select * from t;
> I                            
> -----------------------------
> 1962-09-23 03:23:34.123456789

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira