diff options
author | Etsuro Fujita <efujita@postgresql.org> | 2019-04-02 20:30:45 +0900 |
---|---|---|
committer | Etsuro Fujita <efujita@postgresql.org> | 2019-04-02 20:30:45 +0900 |
commit | d50d172e517c1d2aabff3ceb3ad3113b909c5017 (patch) | |
tree | 7a65adb1310d1fa0f08effc93ee75e7558cc8d9f /contrib/postgres_fdw/postgres_fdw.h | |
parent | aef65db6769e3f2c855dd89edcf95a536a9ab74f (diff) | |
download | postgresql-d50d172e517c1d2aabff3ceb3ad3113b909c5017.tar.gz postgresql-d50d172e517c1d2aabff3ceb3ad3113b909c5017.zip |
postgres_fdw: Perform the (FINAL, NULL) upperrel operations remotely.
The upper-planner pathification allows FDWs to arrange to push down
different types of upper-stage operations to the remote side. This
commit teaches postgres_fdw to do it for the (FINAL, NULL) upperrel,
which is responsible for doing LockRows, LIMIT, and/or ModifyTable.
This provides the ability for postgres_fdw to handle SELECT commands
so that it 1) skips the LockRows step (if any) (note that this is
safe since it performs early locking) and 2) pushes down the LIMIT
and/or OFFSET restrictions (if any) to the remote side. This doesn't
handle the INSERT/UPDATE/DELETE cases.
Author: Etsuro Fujita
Reviewed-By: Antonin Houska and Jeff Janes
Discussion: https://postgr.es/m/87pnz1aby9.fsf@news-spur.riddles.org.uk
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.h')
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.h index e9cbbe62341..b3829450675 100644 --- a/contrib/postgres_fdw/postgres_fdw.h +++ b/contrib/postgres_fdw/postgres_fdw.h @@ -188,7 +188,8 @@ extern List *build_tlist_to_deparse(RelOptInfo *foreignrel); extern void deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, List *tlist, List *remote_conds, List *pathkeys, - bool has_final_sort, bool is_subquery, + bool has_final_sort, bool has_limit, + bool is_subquery, List **retrieved_attrs, List **params_list); extern const char *get_jointype_name(JoinType jointype); |