Re: Stored procedure failure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michal Hlavac <hlavki(at)medium13(dot)sk>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: Stored procedure failure
Date: 2004-08-27 17:51:00
Message-ID: 829.1093629060@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michal Hlavac <hlavki(at)medium13(dot)sk> writes:
> Tom Lane wrote:
>> I can't reproduce a crash here, but perhaps that's because you have not
>> supplied any sample data...

> I attached file with data, where it fails...

Thanks. It turns out the main reason I couldn't reproduce it was
I was testing in CVS tip, where the bug had already been repaired.
I've applied the attached patch to the 7.4 branch to fix it there.

regards, tom lane

Index: gistget.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/access/gist/gistget.c,v
retrieving revision 1.36
diff -c -r1.36 gistget.c
*** gistget.c 4 Aug 2003 02:39:57 -0000 1.36
--- gistget.c 27 Aug 2004 17:44:04 -0000
***************
*** 234,249 ****
key[0].sk_attno,
giststate->tupdesc,
&isNull);
if (isNull)
{
/* XXX eventually should check if SK_ISNULL */
return false;
}
!
! /* this code from backend/access/common/indexvalid.c. But why and what???
if (key[0].sk_flags & SK_ISNULL)
return false;
! */
gistdentryinit(giststate, key[0].sk_attno - 1, &de,
datum, r, p, offset,
IndexTupleSize(tuple) - sizeof(IndexTupleData),
--- 234,249 ----
key[0].sk_attno,
giststate->tupdesc,
&isNull);
+ /* is the index entry NULL? */
if (isNull)
{
/* XXX eventually should check if SK_ISNULL */
return false;
}
! /* is the compared-to datum NULL? */
if (key[0].sk_flags & SK_ISNULL)
return false;
!
gistdentryinit(giststate, key[0].sk_attno - 1, &de,
datum, r, p, offset,
IndexTupleSize(tuple) - sizeof(IndexTupleData),

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Shraibman 2004-08-27 18:13:03 Re: performance of IN (subquery)
Previous Message Duane Lee - EGOVX 2004-08-27 17:44:51 Re: performance of IN (subquery)