Re: Fulltextindex - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fulltextindex
Date
Msg-id 27847.1030690391@sss.pgh.pa.us
Whole thread Raw
In response to Fulltextindex  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: Fulltextindex  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> struct varlena *data;
> char    *word           = NULL;
> char    *cur_pos        = NULL;
> int     cur_pos_length  = 0;

> data = (struct varlena *) palloc(column_length);

> while(cur_pos > word)
> {
>     cur_pos_length = strlen(cur_pos);
>     /* Line below causes seg fault on SECOND iteration */

You are not telling the whole truth here, as the above code excerpt
will obviously never iterate the WHILE even once.  "NULL > NULL" is
false in every C I ever heard of.

Also, how much is column_length and how does it relate to the amount
of data being copied into *data ?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: RULE regression test failure
Next
From: Tom Lane
Date:
Subject: Re: RULE regression test failure