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 "Satheesh Bandaram (JIRA)" <de...@db.apache.org> on 2004/11/24 19:47:22 UTC

[jira] Created: (DERBY-81) Datetime datatypes should allow arithmetic operations on them.

Datetime datatypes should allow arithmetic operations on them.
--------------------------------------------------------------

         Key: DERBY-81
         URL: http://nagoya.apache.org/jira/browse/DERBY-81
     Project: Derby
        Type: New Feature
  Components: SQL  
    Versions: 10.0.2.0    
 Environment: Generic
    Reporter: Satheesh Bandaram
 Assigned to: Satheesh Bandaram 


Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:

   SELECT * FROM log 
   WHERE modified_time > CURRENT_TIMESTAMP &#8211; 1 MONTH

Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.

It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-81) Datetime datatypes should allow arithmetic operations on them.

Posted by "Satheesh Bandaram (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-81?page=all ]
     
Satheesh Bandaram resolved DERBY-81:
------------------------------------

    Fix Version: 10.1.1.0
     Resolution: Fixed

Fix has been available in 10.1 release.

> Datetime datatypes should allow arithmetic operations on them.
> --------------------------------------------------------------
>
>          Key: DERBY-81
>          URL: http://issues.apache.org/jira/browse/DERBY-81
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.0.2.0
>  Environment: Generic
>     Reporter: Satheesh Bandaram
>      Fix For: 10.1.1.0

>
> Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. Enable datetime arithmetic in a standard way.
> This feature has already been implemented in 10.1 and is documented in Derby 10.1 manuals. Refer to functionality there.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-81) Datetime datatypes should allow arithmetic operations on them.

Posted by "Satheesh Bandaram (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-81?page=all ]
     
Satheesh Bandaram closed DERBY-81:
----------------------------------


Has been resolved for sometime now.

> Datetime datatypes should allow arithmetic operations on them.
> --------------------------------------------------------------
>
>          Key: DERBY-81
>          URL: http://issues.apache.org/jira/browse/DERBY-81
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.0.2.0
>  Environment: Generic
>     Reporter: Satheesh Bandaram
>      Fix For: 10.1.1.0

>
> Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. Enable datetime arithmetic in a standard way.
> This feature has already been implemented in 10.1 and is documented in Derby 10.1 manuals. Refer to functionality there.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (DERBY-81) Datetime datatypes should allow arithmetic operations on them.

Posted by "Satheesh Bandaram (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-81?page=all ]

Satheesh Bandaram reassigned DERBY-81:
--------------------------------------

    Assign To: Jack Klebanoff  (was: Satheesh Bandaram)

Please update the bug description according to your proposal.

> Datetime datatypes should allow arithmetic operations on them.
> --------------------------------------------------------------
>
>          Key: DERBY-81
>          URL: http://issues.apache.org/jira/browse/DERBY-81
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.0.2.0
>  Environment: Generic
>     Reporter: Satheesh Bandaram
>     Assignee: Jack Klebanoff

>
> Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:
>    SELECT * FROM log 
>    WHERE modified_time > CURRENT_TIMESTAMP - 1 MONTH
> Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.
> It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-81) Datetime datatypes should allow arithmetic operations on them.

Posted by "Satheesh Bandaram (JIRA)" <de...@db.apache.org>.
     [ http://nagoya.apache.org/jira/browse/DERBY-81?page=history ]

Satheesh Bandaram updated DERBY-81:
-----------------------------------

    Description: 
Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:

   SELECT * FROM log 
   WHERE modified_time > CURRENT_TIMESTAMP - 1 MONTH

Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.

It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.

  was:
Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:

   SELECT * FROM log 
   WHERE modified_time > CURRENT_TIMESTAMP &#8211; 1 MONTH

Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.

It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.


> Datetime datatypes should allow arithmetic operations on them.
> --------------------------------------------------------------
>
>          Key: DERBY-81
>          URL: http://nagoya.apache.org/jira/browse/DERBY-81
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.0.2.0
>  Environment: Generic
>     Reporter: Satheesh Bandaram
>     Assignee: Satheesh Bandaram

>
> Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:
>    SELECT * FROM log 
>    WHERE modified_time > CURRENT_TIMESTAMP - 1 MONTH
> Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.
> It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-81) Datetime datatypes should allow arithmetic operations on them.

Posted by "Jack Klebanoff (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-81?page=comments#action_66203 ]
     
Jack Klebanoff commented on DERBY-81:
-------------------------------------

As of revision 178061 Derby supports the ODBC/JCBC TIMESTAMPADD and TIMESTAMPDIFF escape functions. So the query in the request can be written as

  SELECT * FROM log
  WHERE modified_time > TIMESTAMPADD( SQL_TSI_MONTH, 1, CURRENT_TIMESTAMP)

Unfortunately, the major SQL databases all seem to implement datetime arithmetic in different and incompatible ways. The ODBC/JDBC escape functions, though somewhat awkward, are the closest thing to a common denominator here.

> Datetime datatypes should allow arithmetic operations on them.
> --------------------------------------------------------------
>
>          Key: DERBY-81
>          URL: http://issues.apache.org/jira/browse/DERBY-81
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.0.2.0
>  Environment: Generic
>     Reporter: Satheesh Bandaram
>     Assignee: Jack Klebanoff

>
> Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:
>    SELECT * FROM log 
>    WHERE modified_time > CURRENT_TIMESTAMP - 1 MONTH
> Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.
> It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-81) Datetime datatypes should allow arithmetic operations on them.

Posted by "Satheesh Bandaram (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-81?page=all ]

Satheesh Bandaram updated DERBY-81:
-----------------------------------

    Description: 
Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. Enable datetime arithmetic in a standard way.

This feature has already been implemented in 10.1 and is documented in Derby 10.1 manuals. Refer to functionality there.

  was:
Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:

   SELECT * FROM log 
   WHERE modified_time > CURRENT_TIMESTAMP - 1 MONTH

Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.

It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.


> Datetime datatypes should allow arithmetic operations on them.
> --------------------------------------------------------------
>
>          Key: DERBY-81
>          URL: http://issues.apache.org/jira/browse/DERBY-81
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.0.2.0
>  Environment: Generic
>     Reporter: Satheesh Bandaram
>      Fix For: 10.1.1.0

>
> Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. Enable datetime arithmetic in a standard way.
> This feature has already been implemented in 10.1 and is documented in Derby 10.1 manuals. Refer to functionality there.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-81) Datetime datatypes should allow arithmetic operations on them.

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-81?page=all ]

Mike Matrigali updated DERBY-81:
--------------------------------

    Description: 
Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:

   SELECT * FROM log 
   WHERE modified_time > CURRENT_TIMESTAMP - 1 MONTH

Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.

It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.

  was:
Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:

   SELECT * FROM log 
   WHERE modified_time > CURRENT_TIMESTAMP - 1 MONTH

Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.

It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.

      Assign To:     (was: Jack Klebanoff)

I don't believe jack is working on this any more.

> Datetime datatypes should allow arithmetic operations on them.
> --------------------------------------------------------------
>
>          Key: DERBY-81
>          URL: http://issues.apache.org/jira/browse/DERBY-81
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.0.2.0
>  Environment: Generic
>     Reporter: Satheesh Bandaram

>
> Datetime datatypes in Derby are date, time and timestamp. Currently Derby doesn't allow any arithmetic operations on them, limiting their use. It would be great to allow statements like:
>    SELECT * FROM log 
>    WHERE modified_time > CURRENT_TIMESTAMP - 1 MONTH
> Commercial databases like Oracle, DB2 and mySQL also have this feature. SQL standard allows these operations along with INTERVAL types. Since Derby doesn't have INTERVAL datatypes, I would like to propose datetime arithmetic to Derby without INTERVALs.
> It should be possible to add, subtract datetime datatypes with a constant like '1 MONTH' (called a duration or INTERVAL in SQL standard). It should also be possible to subtract datetime types where the semantics are allowed according to SQL standard specification.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira