未验证 提交 eea71b3d 编写于 作者: F Francisco Guerrero 提交者: GitHub

Remove restriction to INSERT/UPDATE/DELETE foreign relations (#6202)

- While spiking on implementing PXF using FDW,
  we noticed that error messages for file_fdw
  were different from upstream error messages
  when updating a file_fdw. GPDB introduced a
  check in `setTargetTable` for foreign relations
  that might have not been cleaned up during
  merge. This PR removes the check in `setTargetTable`
  and fixes the expected output in file_fdw.
  Running make installcheck on file_fdw, now
  succeeds, as we are matching the upstream
  error message "updates aren't supported".
Authored-by: NFrancisco Guerrero <aguerrero@pivotal.io>
上级 fc5a7d74
......@@ -364,14 +364,6 @@ setTargetTable(ParseState *pstate, RangeVar *relation,
errmsg("permission denied: \"%s\" is a system catalog",
RelationGetRelationName(pstate->p_target_relation))));
/* special check for DML on foreign relations */
if(RelationIsForeign(pstate->p_target_relation))
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("foreign tables are read only. cannot change \"%s\"",
RelationGetRelationName(pstate->p_target_relation))));
/* special check for DML on external relations */
if(RelationIsExternal(pstate->p_target_relation))
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册