]> granicus.if.org Git - postgresql/commitdiff
Un-break pg_dump --- pg_class.indproc is now regproc not oid, which
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Aug 2001 00:44:40 +0000 (00:44 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Aug 2001 00:44:40 +0000 (00:44 +0000)
for some reason displays a zero oid differently.  Possibly we should
revert that schema change, but it's easy to make pg_dump accept both
spellings so I'll do that for now.

src/bin/pg_dump/pg_dump.c

index f81439e2036e46619940262fb2b3cdaef9aa1627..e48ed0bdb4cde1f6ec068544f2443336e85a6569 100644 (file)
@@ -22,7 +22,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.224 2001/08/22 20:23:23 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.225 2001/08/27 00:44:40 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -4370,8 +4370,9 @@ dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
                        continue;
                }
 
-
-               if (strcmp(indinfo[i].indproc, "0") == 0)
+               /* indproc is regproc in 7.2, oid previously, so check both */
+               if (strcmp(indinfo[i].indproc, "-") == 0 ||
+                       strcmp(indinfo[i].indproc, "0") == 0)
                        funcname = NULL;
                else
                {