aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi Inoue <inoue@tpf.co.jp>2000-11-10 09:38:21 +0000
committerHiroshi Inoue <inoue@tpf.co.jp>2000-11-10 09:38:21 +0000
commit27026fef603b6db414df277966fac0ce791fb749 (patch)
tree0ce01df58496cfeb465d8b98b99a8ddfb1e0759e
parent92875e6f4468b4141775518db96e8f7d88ea1e72 (diff)
downloadpostgresql-27026fef603b6db414df277966fac0ce791fb749.tar.gz
postgresql-27026fef603b6db414df277966fac0ce791fb749.zip
Use SearchSysCacheTupleCopy() instead of SearchSysCacheTuple() in
order to continue to access the tuple more than now. This would resolve a segmentation fault error.
-rw-r--r--src/backend/utils/adt/selfuncs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index f68b43badaf..818bc6ab082 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.80 2000/10/05 19:48:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.81 2000/11/10 09:38:21 inoue Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1250,7 +1250,7 @@ getattstatistics(Oid relid,
* have at hand! (For example, we might have a '>' operator rather
* than the '<' operator that will appear in staop.)
*/
- tuple = SearchSysCacheTuple(STATRELID,
+ tuple = SearchSysCacheTupleCopy(STATRELID,
ObjectIdGetDatum(relid),
Int16GetDatum((int16) attnum),
0,
@@ -1351,6 +1351,7 @@ getattstatistics(Oid relid,
pfree(strval);
}
}
+ heap_freetuple(tuple);
return true;
}