Re: [HACKERS] Fulltextindex

2002-08-30 Thread Tom Lane
"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > struct varlena *data; > char*word = "john"; > char*cur_pos= NULL; > int cur_pos_length = 0; > data = (struct varlena *) palloc(VARHDRSZ + column_length + 1); > word_length = strlen(word); > cur_pos = &word[word

Re: [HACKERS] Fulltextindex

2002-08-30 Thread Nigel J. Andrews
On Fri, 30 Aug 2002, Christopher Kings-Lynne wrote: > > > > struct varlena *data; > char*word = "john"; > char*cur_pos= NULL; > int cur_pos_length = 0; > > data = (struct varlena *) palloc(VARHDRSZ + column_length + 1); > word_len

Re: [HACKERS] Fulltextindex

2002-08-29 Thread Christopher Kings-Lynne
OK, I was probably a little aggressive in my pruning...BTW, this code was not written by me... struct varlena *data; char*word = "john"; char*cur_pos= NULL; int cur_pos_length = 0; data = (struct varlena *) palloc(VARHDRSZ + column

Re: [HACKERS] Fulltextindex

2002-08-29 Thread Tom Lane
"Christopher Kings-Lynne" <[EMAIL PROTECTED]> 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)