Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c114bf3

Browse files
committed
A "lost in the archives" patch from Chris Dunlop <chris@atlas.onthe.net.au>
1 parent dbf2a8c commit c114bf3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
*
2222
* IDENTIFICATION
23-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.4 1996/07/27 02:29:51 scrappy Exp $
23+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.5 1996/07/31 06:09:46 scrappy Exp $
2424
*
2525
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2626
*
@@ -51,6 +51,7 @@
5151
#endif
5252

5353
#include "postgres.h"
54+
#include "access/htup.h"
5455
#include "libpq-fe.h"
5556

5657
#include "pg_dump.h"
@@ -1309,7 +1310,10 @@ dumpIndices(FILE* fout, IndInfo* indinfo, int numIndices,
13091310
tableInd = findTableByName(tblinfo, numTables,
13101311
indinfo[i].indrelname);
13111312
indkey = atoi(indinfo[i].indkey) - 1;
1312-
attname = tblinfo[tableInd].attnames[indkey];
1313+
if (indkey == ObjectIdAttributeNumber - 1)
1314+
attname = "oid";
1315+
else
1316+
attname = tblinfo[tableInd].attnames[indkey];
13131317
if (strcmp(indinfo[i].indproc,"0") == 0) {
13141318
funcname = NULL;
13151319
} else {

0 commit comments

Comments
 (0)