From 50c19fc76f05124b80fc4c5d20a359c5dbf017af Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 12 Mar 2013 18:58:13 -0400 Subject: Fix contrib/postgres_fdw's handling of column defaults. Adopt the position that only locally-defined defaults matter. Any defaults defined in the remote database do not affect insertions performed through a foreign table (unless they are for columns not known to the foreign table). While it'd arguably be more useful to permit remote defaults to be used, making that work in a consistent fashion requires far more work than seems possible for 9.3. --- contrib/postgres_fdw/postgres_fdw.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 9149aa186f7..fc0e7b61fde 100644 --- a/contrib/postgres_fdw/postgres_fdw.h +++ b/contrib/postgres_fdw/postgres_fdw.h @@ -53,11 +53,14 @@ extern void appendWhereClause(StringInfo buf, PlannerInfo *root, List *exprs, bool is_first); -extern void deparseInsertSql(StringInfo buf, PlannerInfo *root, Index rtindex, +extern void deparseInsertSql(StringInfo buf, PlannerInfo *root, + Index rtindex, Relation rel, List *targetAttrs, List *returningList); -extern void deparseUpdateSql(StringInfo buf, PlannerInfo *root, Index rtindex, +extern void deparseUpdateSql(StringInfo buf, PlannerInfo *root, + Index rtindex, Relation rel, List *targetAttrs, List *returningList); -extern void deparseDeleteSql(StringInfo buf, PlannerInfo *root, Index rtindex, +extern void deparseDeleteSql(StringInfo buf, PlannerInfo *root, + Index rtindex, Relation rel, List *returningList); extern void deparseAnalyzeSizeSql(StringInfo buf, Relation rel); extern void deparseAnalyzeSql(StringInfo buf, Relation rel); -- cgit v1.2.3