Re: SOLVED Re: _penalty gist method invoked with one key - Mailing list pgsql-hackers

From Grzegorz Jaskiewicz
Subject Re: SOLVED Re: _penalty gist method invoked with one key
Date
Msg-id 8776B785-D346-4C5C-96E7-DFEBC9E1AF19@pointblue.com.pl
Whole thread Raw
In response to Re: SOLVED Re: _penalty gist method invoked with one key  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-hackers
On 2005-10-28, at 07:37, Oleg Bartunov wrote:

> On Fri, 28 Oct 2005, Christopher Kings-Lynne wrote:
>
>
>> Grzegorz - it'd be great if you submitted documentation  
>> improvements :)
>>
>
> I don't see any GiST specific problem in Grzegorz's case.
>
Other than just stupid bug, I know. It was just hard to find.  
Luckily, I have test cases for internal functions. This is separate  
program, that I can valgrind (me hugs valgrind).
Valgrind showed me that there is branch based on not initialized  
value. So I thought, maybe also length isn't initialized there, and I  
was right.
So, here's a tip from me: if your type has variable length, create  
separate function to locate all memory, and to fill out all fields.  
In my case it was possible, and helped.

Where is about docs, yes, I do plan to put out some tut based on my  
experiences. I will definitely give it to you guys to review here.

Thanks.



pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Ideas for easier debugging of backend problems
Next
From: Andrew Dunstan
Date:
Subject: Re: enums