]> granicus.if.org Git - postgresql/commitdiff
Fix pg_dump for UPDATE policies
authorStephen Frost <sfrost@snowman.net>
Fri, 17 Oct 2014 12:07:46 +0000 (08:07 -0400)
committerStephen Frost <sfrost@snowman.net>
Fri, 17 Oct 2014 12:07:46 +0000 (08:07 -0400)
pg_dump had the wrong character for update and so was failing when
attempts were made to pg_dump databases with UPDATE policies.

Pointed out by Fujii Masao (thanks!)

src/bin/pg_dump/pg_dump.c

index c56a4cba40e4b02a71ab78fc33bba446536c9735..16ebc12e19348ca4767b2b3e1b527e36100618a7 100644 (file)
@@ -2939,7 +2939,7 @@ dumpRowSecurity(Archive *fout, DumpOptions *dopt, RowSecurityInfo *rsinfo)
                cmd = "SELECT";
        else if (strcmp(rsinfo->rseccmd, "a") == 0)
                cmd = "INSERT";
-       else if (strcmp(rsinfo->rseccmd, "u") == 0)
+       else if (strcmp(rsinfo->rseccmd, "w") == 0)
                cmd = "UPDATE";
        else if (strcmp(rsinfo->rseccmd, "d") == 0)
                cmd = "DELETE";