Comments (2)
This is something I would really like to see happening: not treating the
T_Param specially, and using the whole expression evaluation.
Frankly, the current code to do this is quite ugly and only manages a
subset of the tree.
I'll try to look a bit deeper into it, but I think it would need the
following:
- The building of the clauses (quals list and params list) is done at plan
time, and cached for the execution. (via the extract_restrictions
machinery). This must change, at least for params. - At plan time, the restrictions should be scanned again to find every
T_Var OPERATOR AnyExpr clauses, and evaluate the right hand side (using
ExecEvalExpr).
I don't really know what amount of work does that entail, but I'm convinced
the resulting code would be cleaner (no more awkward serialization between
plan and execution phase).
If I recall correctly, postgres_fdw does exactly that. You may look at it
for inspiration :)
2013/6/28 David Crawford [email protected]
Since the code only pushes down quals that compare to T_Const, T_Param,
and T_Var, it doesn't evaluate now() (a T_FuncExpr) and push down as a
constant. I don't know enough about PostgreSQL development to know if this
would be easy or hard. I'm happy to contribute this feature if you can give
me a starting point.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/18
.
from multicorn.
I just pushed this to the master branch:
- params are no longer treated specially
- every expression on the right hand side which does not contain any volatile function (such as random) or a reference to the table itself (ie, col1 = some_function(col2)) will be evaluated at execution time.
from multicorn.
Related Issues (20)
- the return of 'Plpy is not a built-int module' HOT 4
- ERROR: could not access file "$libdir/multicorn": No such file or directory HOT 2
- how to compile multicorn HOT 1
- During attempted install, warning about missing MacOSX10.14.sdk, error about stdio.h not found HOT 1
- Out of Memory Errors cause core dump
- ImportError No module named multicorn
- Failure to reinitailze null array causes core dump
- rowid_column difficulties HOT 2
- Build error against PostgreSQL 13 HOT 16
- Support for JOINs HOT 1
- why the operator "ID=999999999999999999999999" cannot get the result , when query on the numeric(24,0) column ? HOT 2
- First request speed
- Build error in Postgres 13 HOT 1
- Build error against PostgreSQL 14 HOT 21
- Push JOINs to the fdw level HOT 2
- Is Multicorn dead? HOT 19
- Multicorn is forked & alive in a new place: pgsql-io/multicorn HOT 2
- Multicorn2.org is born HOT 2
- multicorn.so: undefined symbol: oid_hash
- Multicorn2 is alive and well HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multicorn.