Comments are more than welcome!1. Would be better to add this test-and-error before tsvector_bsearch call.+ if (lex_len == 0)+ ereport(ERROR,+ (errcode(ERRCODE_ZERO_LENGTH_CHARACTER_STRING),+ errmsg("lexeme array may not contain empty strings")));+If lex_len is equal to zero, better get out soon.2. The second test-and-error can use lex_len, just like the first test, I don't see the point in recalculating the size of lex_len if that's already done.+ if (VARSIZE(dlexemes[i]) - VARHDRSZ == 0)+ ereport(ERROR,+ (errcode(ERRCODE_ZERO_LENGTH_CHARACTER_STRING),+ errmsg("lexeme array may not contain empty strings")));+
Comments are more than welcome!
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных