Re: [GENERAL] HELP! BUG? pg_dump mucks up grant/revoke

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Keith F Irwin <kirwin14(at)home(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [GENERAL] HELP! BUG? pg_dump mucks up grant/revoke
Date: 2001-07-29 22:15:04
Message-ID: 11087.996444904@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Keith F Irwin <kirwin14(at)home(dot)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);

}

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-07-30 10:57:52 pg_regress fails at "point" test
Previous Message Tom Lane 2001-07-29 19:46:54 Re: timestamp (minor bug)

Browse pgsql-general by date

  From Date Subject
Next Message Svenne Krap 2001-07-29 22:47:35 Re: "Oracle's ROWNUM"
Previous Message Tom Lane 2001-07-29 20:15:02 Re: Re: Better backtrace (wasRe: pqReadData() -- backend closed the channel unexpectedly.)