
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Any
|
|
Issue Links:
|
Relate
|
|
|
|
This issue is related to:
|
|
|
|
|
|
|
|
| Planning Status: |
Included to release
|
|
This is a regression introduced in v2.1 and it's caused by a more strict checking for datatypes being compatible for an index scan. In dialect 1, expression ('now' - <const>) has the datatype "double precision" which is now considered incompatible with a timestamp. A workaround is to use CAST or the explicit datatype prefix before 'now'. This issue affects other date/time constants ('today', etc) as well.
In case we'll intend to fix that issue, a possible solution would be to check not only the descriptor datatype but also node flags (nod_date / nod_double). This should allow better compatibility with the legacy dialect.
Test case (database dialect 1):
create table t (col timestamp) ;
create index it on t (col) ;
commit ;
select * from t where col > timestamp 'now' - 7 ;
-- PLAN (T INDEX (IT))
-- OK
select * from t where col > 'now' - 7 ;
-- PLAN (T NATURAL)
-- PROBLEM
|
|
Description
|
This is a regression introduced in v2.1 and it's caused by a more strict checking for datatypes being compatible for an index scan. In dialect 1, expression ('now' - <const>) has the datatype "double precision" which is now considered incompatible with a timestamp. A workaround is to use CAST or the explicit datatype prefix before 'now'. This issue affects other date/time constants ('today', etc) as well.
In case we'll intend to fix that issue, a possible solution would be to check not only the descriptor datatype but also node flags (nod_date / nod_double). This should allow better compatibility with the legacy dialect.
Test case (database dialect 1):
create table t (col timestamp) ;
create index it on t (col) ;
commit ;
select * from t where col > timestamp 'now' - 7 ;
-- PLAN (T INDEX (IT))
-- OK
select * from t where col > 'now' - 7 ;
-- PLAN (T NATURAL)
-- PROBLEM
|
Show » |
|