projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd11d05
)
Arrange for GRANT/REVOKE on a view to be dumped at the right time,
author
Tom Lane
<
[email protected]
>
Sun, 29 Jul 2001 22:12:49 +0000
(22:12 +0000)
committer
Tom Lane
<
[email protected]
>
Sun, 29 Jul 2001 22:12:49 +0000
(22:12 +0000)
namely after the view definition rather than before it. Bug introduced
in 7.1 by changes to dump stuff in OID ordering.
src/bin/pg_dump/pg_dump.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pg_dump/pg_dump.c
b/src/bin/pg_dump/pg_dump.c
index 88f9304e3d48db569320007f9fcc6d754e4df763..0437b035630a53195465f5a90b92a3d30f44ee70 100644
(file)
--- a/
src/bin/pg_dump/pg_dump.c
+++ b/
src/bin/pg_dump/pg_dump.c
@@
-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);
}