diff --git a/src/backend/distributed/deparser/deparse_view_stmts.c b/src/backend/distributed/deparser/deparse_view_stmts.c index 673b71194..19b51fdc2 100644 --- a/src/backend/distributed/deparser/deparse_view_stmts.c +++ b/src/backend/distributed/deparser/deparse_view_stmts.c @@ -144,8 +144,11 @@ AddOptionsToCreateViewCommand(StringInfo buf, ViewStmt *stmt) } appendStringInfoString(buf, option->defname); - appendStringInfoString(buf, "="); - appendStringInfoString(buf, defGetString(option)); + if (option->arg != NULL) + { + appendStringInfoString(buf, "="); + appendStringInfoString(buf, defGetString(option)); + } } appendStringInfoString(buf, ") "); diff --git a/src/backend/distributed/metadata/dependency.c b/src/backend/distributed/metadata/dependency.c index bd5a379ad..2ede2dad0 100644 --- a/src/backend/distributed/metadata/dependency.c +++ b/src/backend/distributed/metadata/dependency.c @@ -820,15 +820,16 @@ DeferErrorIfHasUnsupportedDependency(const ObjectAddress *objectAddress) if (IsObjectDistributed(objectAddress)) { - appendStringInfo(hintInfo, "Distribute \"%s\" first to update \"%s\" on worker nodes", - dependencyDescription, - objectDescription); + appendStringInfo(hintInfo, + "Distribute \"%s\" first to update \"%s\" on worker nodes", + dependencyDescription, + objectDescription); } else { appendStringInfo(hintInfo, "Distribute \"%s\" first to distribute \"%s\"", - dependencyDescription, - objectDescription); + dependencyDescription, + objectDescription); } return DeferredError(ERRCODE_FEATURE_NOT_SUPPORTED,