Skip to content

Commit d15a118

Browse files
committed
Quick-hack solution to regproc/oid issue was not the right solution.
1 parent ceca2a7 commit d15a118

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*
2424
* IDENTIFICATION
25-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.225 2001/08/27 00:44:40 tgl Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.226 2001/08/27 01:09:59 tgl Exp $
2626
*
2727
*-------------------------------------------------------------------------
2828
*/
@@ -2883,7 +2883,7 @@ getIndexes(int *numIndexes)
28832883
"SELECT i.indexrelid as indexreloid, "
28842884
"i.indrelid as indreloid, "
28852885
"t1.relname as indexrelname, t2.relname as indrelname, "
2886-
"i.indproc, i.indkey, i.indclass, "
2886+
"i.indproc :: oid AS indproc, i.indkey, i.indclass, "
28872887
"a.amname as indamname, i.indisunique, i.indisprimary, "
28882888
"length(i.indpred) > 0 as indhaspred "
28892889
"from pg_index i, pg_class t1, pg_class t2, pg_am a "
@@ -4370,16 +4370,15 @@ dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
43704370
continue;
43714371
}
43724372

4373-
/* indproc is regproc in 7.2, oid previously, so check both */
4374-
if (strcmp(indinfo[i].indproc, "-") == 0 ||
4375-
strcmp(indinfo[i].indproc, "0") == 0)
4373+
4374+
if (strcmp(indinfo[i].indproc, "0") == 0)
43764375
funcname = NULL;
43774376
else
43784377
{
43794378
int numFuncs;
43804379

43814380
/*
4382-
* the funcname is an oid which we use to find the name of the
4381+
* the indproc is an oid which we use to find the name of the
43834382
* pg_proc. We need to do this because getFuncs() only reads
43844383
* in the user-defined funcs not all the funcs. We might not
43854384
* find what we want by looking in FuncInfo*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy