Closed seunofk closed 2 years ago
Sorry for the late response, I was on vacation.
The reason is that a.date
is a string data type (text
or varchar
), and "greater" or "less" conditions like >=
are not pushed down for such data types.
This is because there is no guarantee that the comparison will do the same thing in Oracle and in PostgreSQL, since the collations used are different. This could lead to wrong results.
If you cannot use the proper data type DATE
in Oracle, perhaps you could use to_date
in the query and use a functional index in Oracle (I didn't test that).
Is there anything still unclear? Can I close the issue?
Hi.
When oracle date type is varchar2,
When executing a query in PostgreSQL through oracle_fdw
querying using comparison operator >=, index cannot be used in this condition.
index cannot be used
But = in this condition, index is used.
index be used.
May I know what is the difference?
I am currently using version oracle 19.0.2
PostgreSQl oracle_fdw 2.2
and PostgreSQL 12.7
Wait for your reply.
thank you.