Fulltextindex
От | Christopher Kings-Lynne |
---|---|
Тема | Fulltextindex |
Дата | |
Msg-id | GNELIHDDFBOCMGBFGEFOGEPICDAA.chriskl@familyhealth.com.au обсуждение исходный текст |
Ответ на | Re: RULE regression test failure (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Fulltextindex
|
Список | pgsql-hackers |
An aside. In the fulltextindex code I'm trying to figure out what's breaking the attached code segment. Basically the data->vl_len line causes a segfault on the second time thru the while loop. I can't figure it out. I can't write to the value, but why? Basically with a word like 'john', it is inserting 'hn', then 'ohn' and then 'john' into the database. Thanks for any help for me getting this in for the beta! Chris ------------------------------------- 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 */data->vl_len = cur_pos_length + sizeof(int32);memcpy(VARDATA(data),cur_pos, cur_pos_length);values[0] = PointerGetDatum(data);values[1] = 0;values[2] = oid; ret = SPI_execp(*(plan->splan), values, NULL, 0);if(ret != SPI_OK_INSERT) elog(ERROR, "Full Text Indexing: error executingplan in insert\n"); cur_pos--; }
В списке pgsql-hackers по дате отправления: