aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1996-07-31 06:09:46 +0000
committerMarc G. Fournier <scrappy@hub.org>1996-07-31 06:09:46 +0000
commitc114bf330dc16cbe4155eef3d27d4f33d2ddf2ae (patch)
tree20ffc55308a353d9fa8c0116ed4974e29b96e27d /src
parentdbf2a8c9840c9a83287c2b7e69797a693e142d39 (diff)
downloadpostgresql-c114bf330dc16cbe4155eef3d27d4f33d2ddf2ae.tar.gz
postgresql-c114bf330dc16cbe4155eef3d27d4f33d2ddf2ae.zip
A "lost in the archives" patch from Chris Dunlop <chris@atlas.onthe.net.au>
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 639d0b5ec81..85943a88b1f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -20,7 +20,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.4 1996/07/27 02:29:51 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.5 1996/07/31 06:09:46 scrappy Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
@@ -51,6 +51,7 @@
#endif
#include "postgres.h"
+#include "access/htup.h"
#include "libpq-fe.h"
#include "pg_dump.h"
@@ -1309,7 +1310,10 @@ dumpIndices(FILE* fout, IndInfo* indinfo, int numIndices,
tableInd = findTableByName(tblinfo, numTables,
indinfo[i].indrelname);
indkey = atoi(indinfo[i].indkey) - 1;
- attname = tblinfo[tableInd].attnames[indkey];
+ if (indkey == ObjectIdAttributeNumber - 1)
+ attname = "oid";
+ else
+ attname = tblinfo[tableInd].attnames[indkey];
if (strcmp(indinfo[i].indproc,"0") == 0) {
funcname = NULL;
} else {