Re: Fulltextindex

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fulltextindex
Date: 2002-08-30 06:53:11
Message-ID: 27847.1030690391@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)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

In response to

  • Fulltextindex at 2002-08-30 06:42:15 from Christopher Kings-Lynne

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-30 07:00:52 Re: RULE regression test failure
Previous Message Christopher Kings-Lynne 2002-08-30 06:52:16 Re: RULE regression test failure