db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suresh Thalamati <suresh.thalam...@gmail.com>
Subject is it ok to allow TIMESTAMPADD/TIMESTAMPDIFF function in softupgrade mode ?
Date Fri, 17 Jun 2005 22:11:38 GMT
I am wondering,  if  is ok to permit  TIMESTAMPADD/TIMESTAMPDIFF  
functions on  soft upgrade from 10. 0  ?
For example , if  I create a trigger that uses TIMESTAMPADD function on  
soft upgrade from 10.0 to 10.2 , and
when I revert back  to 10.0  it gives    syntax error  when trigger is 
executed  on 10.0.
is this the expected behavior ?

FYI:
Example:
on 10.0:
ij> connect 'jdbc:derby:wombat;create=true';
ij> create table tx(a int, ts1 TIMESTAMP , ts2 TIMESTAMP) ;

on 10.2:
ij> connect 'jdbc:derby:wombat';
ij> create trigger tg1 after insert on tx for each statement
mode db2sql update tx set ts2 = {fn TIMESTAMPADD( SQL_TSI_DAY, 1, ts2)};
0 rows inserted/updated/deleted

on 10.0:
ij> connect 'jdbc:derby:wombat';
ij> insert into tx values (2, CURRENT_TIMESTAMP , CURRENT_TIMESTAMP);
ERROR 42X01: Syntax error: Encountered "TIMESTAMPADD" at line 1, column 25.


Thanks
-suresht



Mime
View raw message