From: Tom Lane Date: Mon, 24 Sep 2012 04:18:17 +0000 (-0400) Subject: Prevent emitting "ALTER VIEW foo SET ()". X-Git-Tag: REL9_2_2~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2292f6405670e1fdac13998f87b4348c71fb9e6;p=postgresql Prevent emitting "ALTER VIEW foo SET ()". Small oversight in commit 0f524ea0cf388a149f362e48a33c01662eeddc04 ... per report from Grazvydas Valeika. --- diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index dbf589a72b..e3d188708b 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -13755,7 +13755,7 @@ dumpRule(Archive *fout, RuleInfo *rinfo) /* * Apply view's reloptions when its ON SELECT rule is separate. */ - if (rinfo->reloptions) + if (rinfo->reloptions && strlen(rinfo->reloptions) > 0) { appendPQExpBuffer(cmd, "ALTER VIEW %s SET (%s);\n", fmtId(tbinfo->dobj.name),