summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-07-29 22:12:23 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-07-29 22:12:23 +0000
commit8d464d05d72c88a516994e2fa6d35d751163fe97 (patch)
tree8f030940077a0c6a8f56333553e215aa722bbc4e /src
parent94cb3fd8757fd03a7b9f8fd549f63f106e5be6a7 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 783193751b0..1a18bb223c4 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.215 2001/07/17 00:30:35 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.216 2001/07/29 22:12:23 tgl Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
@@ -3808,6 +3808,7 @@ dumpACL(Archive *fout, TableInfo tbinfo)
*tok,
*eqpos,
*priv;
+ char *objoid;
char *sql;
char tmp[1024];
int sSize = 4096;
@@ -3888,7 +3889,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);
}