We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1d0158 commit 7b2ccc5Copy full SHA for 7b2ccc5
src/backend/parser/parse_merge.c
@@ -182,7 +182,8 @@ transformMergeStmt(ParseState *pstate, MergeStmt *stmt)
182
errmsg("cannot execute MERGE on relation \"%s\"",
183
RelationGetRelationName(pstate->p_target_relation)),
184
errdetail_relkind_not_supported(pstate->p_target_relation->rd_rel->relkind)));
185
- if (pstate->p_target_relation->rd_rel->relhasrules)
+ if (pstate->p_target_relation->rd_rules != NULL &&
186
+ pstate->p_target_relation->rd_rules->numLocks > 0)
187
ereport(ERROR,
188
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
189
0 commit comments