aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
-rw-r--r--contrib/postgres_fdw/postgres_fdw.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index f7ab0857a91..0d629e6687b 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -819,7 +819,7 @@ postgresGetForeignPlan(PlannerInfo *root,
}
else
{
- RowMarkClause *rc = get_parse_rowmark(root->parse, baserel->relid);
+ PlanRowMark *rc = get_plan_rowmark(root->rowMarks, baserel->relid);
if (rc)
{
@@ -832,15 +832,18 @@ postgresGetForeignPlan(PlannerInfo *root,
* complete information about, and (b) it wouldn't work anyway on
* older remote servers. Likewise, we don't worry about NOWAIT.
*/
- switch (rc->strength)
+ switch (rc->markType)
{
- case LCS_FORKEYSHARE:
- case LCS_FORSHARE:
- appendStringInfo(&sql, " FOR SHARE");
+ case ROW_MARK_EXCLUSIVE:
+ case ROW_MARK_NOKEYEXCLUSIVE:
+ appendStringInfoString(&sql, " FOR UPDATE");
break;
- case LCS_FORNOKEYUPDATE:
- case LCS_FORUPDATE:
- appendStringInfo(&sql, " FOR UPDATE");
+ case ROW_MARK_SHARE:
+ case ROW_MARK_KEYSHARE:
+ appendStringInfoString(&sql, " FOR SHARE");
+ break;
+ default:
+ /* nothing needed */
break;
}
}