aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/gist/gist.c')
-rw-r--r--src/backend/access/gist/gist.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 8e7b530dea5..4b239c76c8b 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.75 2001/05/15 03:49:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.76 2001/05/15 14:14:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1199,13 +1199,17 @@ gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
gistentryinit(*e, pr, r, pg, o, b, l);
if (giststate->haskeytype)
{
- dep = (GISTENTRY *)
- DatumGetPointer(FunctionCall1(&giststate->decompressFn,
+ if ( b ) {
+ dep = (GISTENTRY *)
+ DatumGetPointer(FunctionCall1(&giststate->decompressFn,
PointerGetDatum(e)));
- gistentryinit(*e, dep->pred, dep->rel, dep->page, dep->offset, dep->bytes,
+ gistentryinit(*e, dep->pred, dep->rel, dep->page, dep->offset, dep->bytes,
dep->leafkey);
- if (dep != e)
- pfree(dep);
+ if (dep != e)
+ pfree(dep);
+ } else {
+ gistentryinit(*e, (char*)NULL, r, pg, o, 0, l);
+ }
}
}