Skip to content

Commit 8d464d0

Browse files
committed
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.
1 parent 94cb3fd commit 8d464d0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*
2424
* IDENTIFICATION
25-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.215 2001/07/17 00:30:35 tgl Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.216 2001/07/29 22:12:23 tgl Exp $
2626
*
2727
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2828
*
@@ -3808,6 +3808,7 @@ dumpACL(Archive *fout, TableInfo tbinfo)
38083808
*tok,
38093809
*eqpos,
38103810
*priv;
3811+
char *objoid;
38113812
char *sql;
38123813
char tmp[1024];
38133814
int sSize = 4096;
@@ -3888,7 +3889,12 @@ dumpACL(Archive *fout, TableInfo tbinfo)
38883889

38893890
free(aclbuf);
38903891

3891-
ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "ACL", NULL, sql, "", "", "", NULL, NULL);
3892+
if (tbinfo.viewdef != NULL)
3893+
objoid = tbinfo.viewoid;
3894+
else
3895+
objoid = tbinfo.oid;
3896+
3897+
ArchiveEntry(fout, objoid, tbinfo.relname, "ACL", NULL, sql, "", "", "", NULL, NULL);
38923898

38933899
}
38943900

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy