-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Number of fetched rows limit is pushed down incorrectly #721
Comments
Nasty. I will investigate that. |
Ah, you are using an old version of oracle_fdw. Yes, that won't reproduce with the current version, since there is no |
I found a reproducer with the regression test database:
|
Thank you for the quick answer. We will try the new (2.7) version. |
I couldn't come up with a better fix than removing |
This is a regression, but was necessary because the existing support for pushing down LIMIT was buggy, as reported by "gytune74". This fixes #721. We can consider pushing down LIMIT again when somebody can come up with a correct implementation.
It is enough to disable |
Following query result is inaccurate:
as limit is pushed down into the EXISTS expression. Every table is Oracle foreign table.
The problem is here:
| Oracle query: SELECT /873020336d7a8837/ r10."BIZ_ID", r10."ONAL_ID" FROM "OGYREV"."BIZONAL" r10 WHERE (r10."BIZ_ID" = 2742536) FETCH FIRST 2 ROWS ONLY |
Also the LEFT JOIN is problematic as well.
The version info:
oracle_fdw 2.6.0, PostgreSQL 16.3, Oracle client 19.15.0.0.0, ORACLE_HOME=/usr/lib/oracle/client
Although 2.7 may fix this as there is no existing order by clause in the EXISTS expression this is not the correct way of pushing down the limit. It is suspicious that every subquery is limited by the outer limit but we did not check it.
The text was updated successfully, but these errors were encountered: