mirror of
https://github.com/postgres/postgres.git
synced 2026-04-22 14:47:29 -04:00
Arrange for GRANT/REVOKE on a view to be dumped at the right time,
namely after the view definition rather than before it. Bug introduced in 7.1 by changes to dump stuff in OID ordering.
This commit is contained in:
parent
a88408be08
commit
d6b1a407f4
1 changed files with 8 additions and 2 deletions
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.205.2.2 2001/05/12 23:36:44 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.205.2.3 2001/07/29 22:12:49 tgl Exp $
|
||||
*
|
||||
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
||||
*
|
||||
|
|
@ -3828,6 +3828,7 @@ dumpACL(Archive *fout, TableInfo tbinfo)
|
|||
*tok,
|
||||
*eqpos,
|
||||
*priv;
|
||||
char *objoid;
|
||||
char *sql;
|
||||
char tmp[1024];
|
||||
int sSize = 4096;
|
||||
|
|
@ -3908,7 +3909,12 @@ dumpACL(Archive *fout, TableInfo tbinfo)
|
|||
|
||||
free(aclbuf);
|
||||
|
||||
ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "ACL", NULL, sql, "", "", "", NULL, NULL);
|
||||
if (tbinfo.viewdef != NULL)
|
||||
objoid = tbinfo.viewoid;
|
||||
else
|
||||
objoid = tbinfo.oid;
|
||||
|
||||
ArchiveEntry(fout, objoid, tbinfo.relname, "ACL", NULL, sql, "", "", "", NULL, NULL);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue