Re: HELP! BUG? pg_dump mucks up grant/revoke - Mailing list pgsql-general

From Tom Lane
Subject Re: HELP! BUG? pg_dump mucks up grant/revoke
Date
Msg-id 11087.996444904@sss.pgh.pa.us
Whole thread Raw
In response to Re: HELP! BUG? pg_dump mucks up grant/revoke  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Keith F Irwin <kirwin14@home.com> writes:
>> [ 7.1.2 pg_dump dumps GRANT/REVOKE for a view before the view itself ]
>>
>> This is a bug, isn't it?

Attached is the patch against 7.1.2 to fix this problem.

            regards, tom lane


*** src/bin/pg_dump/pg_dump.c.orig    Sat May 12 19:36:44 2001
--- src/bin/pg_dump/pg_dump.c    Sun Jul 29 17:31:43 2001
***************
*** 3828,3833 ****
--- 3828,3834 ----
                 *tok,
                 *eqpos,
                 *priv;
+     char       *objoid;
      char       *sql;
      char        tmp[1024];
      int            sSize = 4096;
***************
*** 3908,3914 ****

      free(aclbuf);

!     ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "ACL", NULL, sql, "", "", "", NULL, NULL);

  }

--- 3909,3920 ----

      free(aclbuf);

!     if (tbinfo.viewdef != NULL)
!         objoid = tbinfo.viewoid;
!     else
!         objoid = tbinfo.oid;
!
!     ArchiveEntry(fout, objoid, tbinfo.relname, "ACL", NULL, sql, "", "", "", NULL, NULL);

  }


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Better backtrace (wasRe: pqReadData() -- backend closed the channel unexpectedly.)
Next
From: Svenne Krap
Date:
Subject: Re: "Oracle's ROWNUM"