From e690b9515072fd7767fdeca5c54166f6a77733bc Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 22 Mar 2013 00:31:11 -0400 Subject: Avoid retrieving dummy NULL columns in postgres_fdw. This should provide some marginal overall savings, since it surely takes many more cycles for the remote server to deal with the NULL columns than it takes for postgres_fdw not to emit them. But really the reason is to keep the emitted queries from looking quite so silly ... --- contrib/postgres_fdw/postgres_fdw.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'contrib/postgres_fdw/postgres_fdw.h') diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.h index 78a57ea0575..2939d2b61da 100644 --- a/contrib/postgres_fdw/postgres_fdw.h +++ b/contrib/postgres_fdw/postgres_fdw.h @@ -49,7 +49,8 @@ extern bool is_foreign_expr(PlannerInfo *root, extern void deparseSelectSql(StringInfo buf, PlannerInfo *root, RelOptInfo *baserel, - Bitmapset *attrs_used); + Bitmapset *attrs_used, + List **retrieved_attrs); extern void appendWhereClause(StringInfo buf, PlannerInfo *root, RelOptInfo *baserel, @@ -58,14 +59,18 @@ extern void appendWhereClause(StringInfo buf, List **params); extern void deparseInsertSql(StringInfo buf, PlannerInfo *root, Index rtindex, Relation rel, - List *targetAttrs, List *returningList); + List *targetAttrs, List *returningList, + List **retrieved_attrs); extern void deparseUpdateSql(StringInfo buf, PlannerInfo *root, Index rtindex, Relation rel, - List *targetAttrs, List *returningList); + List *targetAttrs, List *returningList, + List **retrieved_attrs); extern void deparseDeleteSql(StringInfo buf, PlannerInfo *root, Index rtindex, Relation rel, - List *returningList); + List *returningList, + List **retrieved_attrs); extern void deparseAnalyzeSizeSql(StringInfo buf, Relation rel); -extern void deparseAnalyzeSql(StringInfo buf, Relation rel); +extern void deparseAnalyzeSql(StringInfo buf, Relation rel, + List **retrieved_attrs); #endif /* POSTGRES_FDW_H */ -- cgit v1.2.3