]> granicus.if.org Git - postgresql/commitdiff
Prevent emitting "ALTER VIEW foo SET ()".
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Sep 2012 04:18:07 +0000 (00:18 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Sep 2012 04:18:07 +0000 (00:18 -0400)
Small oversight in commit 0f524ea0cf388a149f362e48a33c01662eeddc04 ...
per report from Grazvydas Valeika.

src/bin/pg_dump/pg_dump.c

index cdbed2090834318c932760400526d454315cbdaa..4bed69010580109ef60d9205726e4efedb7355c1 100644 (file)
@@ -13904,7 +13904,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),