Fix BUG #2594: Gin Indexes cause server to crash when it builds on empty table

REL8_2_STABLE
Teodor Sigaev 19 years ago
parent 72a3582522
commit b681bfdd59
  1. 5
      src/backend/access/gin/ginbulk.c

@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/gin/ginbulk.c,v 1.4 2006/07/16 00:54:22 tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/gin/ginbulk.c,v 1.5 2006/08/29 14:05:44 teodor Exp $
*-------------------------------------------------------------------------
*/
@ -245,6 +245,9 @@ ginGetEntry(BuildAccumulator *accum, Datum *value, uint32 *n) {
accum->stack = palloc0(sizeof(EntryAccumulator*)*(accum->maxdepth+1));
entry = accum->entries;
if ( entry == NULL )
return NULL;
/* find most-left value */
for(;;) {
accum->stack[ accum->stackpos ] = entry;

Loading…
Cancel
Save