diff options
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index c3a683715a4..7dd43a99379 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -817,7 +817,7 @@ postgresGetForeignPlan(PlannerInfo *root, } else { - PlanRowMark *rc = get_plan_rowmark(root->rowMarks, baserel->relid); + RowMarkClause *rc = get_parse_rowmark(root->parse, baserel->relid); if (rc) { @@ -830,18 +830,15 @@ 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->markType) + switch (rc->strength) { - case ROW_MARK_EXCLUSIVE: - case ROW_MARK_NOKEYEXCLUSIVE: - appendStringInfoString(&sql, " FOR UPDATE"); - break; - case ROW_MARK_SHARE: - case ROW_MARK_KEYSHARE: + case LCS_FORKEYSHARE: + case LCS_FORSHARE: appendStringInfoString(&sql, " FOR SHARE"); break; - default: - /* nothing needed */ + case LCS_FORNOKEYUPDATE: + case LCS_FORUPDATE: + appendStringInfoString(&sql, " FOR UPDATE"); break; } } |