Prevent emitting "ALTER VIEW foo SET ()".
authorTom Lane
Mon, 24 Sep 2012 04:18:17 +0000 (00:18 -0400)
committerTom Lane
Mon, 24 Sep 2012 04:18:17 +0000 (00:18 -0400)
Small oversight in commit 0f524ea0cf388a149f362e48a33c01662eeddc04 ...
per report from Grazvydas Valeika.

src/bin/pg_dump/pg_dump.c

index dbf589a72b6c8c8997e5f7631b81c160d08cc45c..e3d188708bd913fa697ec4ef1447059506cfd99d 100644 (file)
@@ -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),