aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1998-10-01 01:49:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1998-10-01 01:49:12 +0000
commit0d1aa5ac52240d06d2e430a1e625bd84017552d1 (patch)
tree574e9eb47f9b22807a36d2dae750bee45e685714 /src
parentf447344003e46094c621aee0ec68380436cf6a74 (diff)
downloadpostgresql-0d1aa5ac52240d06d2e430a1e625bd84017552d1.tar.gz
postgresql-0d1aa5ac52240d06d2e430a1e625bd84017552d1.zip
pg_dump -z was careless about ownership of indexes.
Now it's a little less so.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 63d81ac0b7b..799a244a67f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -21,7 +21,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.86 1998/09/23 04:22:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.87 1998/10/01 01:49:12 tgl Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
@@ -2678,6 +2678,11 @@ dumpIndices(FILE *fout, IndInfo *indinfo, int numIndices,
if (!tablename || (!strcmp(indinfo[i].indrelname, tablename)))
{
+ /* We make the index belong to the owner of its table,
+ * which is not necessarily right but should answer 99% of the
+ * time. Would have to add owner name to IndInfo to do it right.
+ */
+ becomeUser(fout, tblinfo[tableInd].usename);
strcpy(id1, fmtId(indinfo[i].indexrelname));
strcpy(id2, fmtId(indinfo[i].indrelname));