aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/deparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/postgres_fdw/deparse.c')
-rw-r--r--contrib/postgres_fdw/deparse.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index 6001f4d25ef..654323f1554 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -332,14 +332,13 @@ foreign_expr_walker(Node *node,
/* Var belongs to foreign table */
/*
- * System columns other than ctid and oid should not be
- * sent to the remote, since we don't make any effort to
- * ensure that local and remote values match (tableoid, in
+ * System columns other than ctid should not be sent to
+ * the remote, since we don't make any effort to ensure
+ * that local and remote values match (tableoid, in
* particular, almost certainly doesn't match).
*/
if (var->varattno < 0 &&
- var->varattno != SelfItemPointerAttributeNumber &&
- var->varattno != ObjectIdAttributeNumber)
+ var->varattno != SelfItemPointerAttributeNumber)
return false;
/* Else check the collation */
@@ -1145,8 +1144,8 @@ deparseTargetList(StringInfo buf,
}
/*
- * Add ctid and oid if needed. We currently don't support retrieving any
- * other system columns.
+ * Add ctid if needed. We currently don't support retrieving any other
+ * system columns.
*/
if (bms_is_member(SelfItemPointerAttributeNumber - FirstLowInvalidHeapAttributeNumber,
attrs_used))
@@ -1164,22 +1163,6 @@ deparseTargetList(StringInfo buf,
*retrieved_attrs = lappend_int(*retrieved_attrs,
SelfItemPointerAttributeNumber);
}
- if (bms_is_member(ObjectIdAttributeNumber - FirstLowInvalidHeapAttributeNumber,
- attrs_used))
- {
- if (!first)
- appendStringInfoString(buf, ", ");
- else if (is_returning)
- appendStringInfoString(buf, " RETURNING ");
- first = false;
-
- if (qualify_col)
- ADD_REL_QUALIFIER(buf, rtindex);
- appendStringInfoString(buf, "oid");
-
- *retrieved_attrs = lappend_int(*retrieved_attrs,
- ObjectIdAttributeNumber);
- }
/* Don't generate bad syntax if no undropped columns */
if (first && !is_returning)
@@ -2079,12 +2062,6 @@ deparseColumnRef(StringInfo buf, int varno, int varattno, RangeTblEntry *rte,
ADD_REL_QUALIFIER(buf, varno);
appendStringInfoString(buf, "ctid");
}
- else if (varattno == ObjectIdAttributeNumber)
- {
- if (qualify_col)
- ADD_REL_QUALIFIER(buf, varno);
- appendStringInfoString(buf, "oid");
- }
else if (varattno < 0)
{
/*