1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Remove asymetrical word processing in query and text

This commit is contained in:
Teodor Sigaev
2004-06-07 16:48:49 +00:00
parent 1532e3a8aa
commit db688bc1c3

View File

@ -240,9 +240,18 @@ pushval_morph(QPRS_STATE * state, int typeval, char *strval, int lenval)
lemm = lemmatize(token, &lenlemm, type);
if (lemm)
{
if ( lemm==token ) {
char *ptrs=token,*ptrd;
ptrd = lemm = palloc(lenlemm+1);
while(ptrs-token<lenlemm) {
*ptrd = tolower((unsigned char) *ptrs);
ptrs++;
ptrd++;
}
*ptrd='\0';
}
pushval_asis(state, VAL, lemm, lenlemm);
if (lemm != token)
pfree(lemm);
pfree(lemm);
}
else
pushval_asis(state, VALTRUE, 0, 0);