Improvements from Heikki Linnakangas <heikki@enterprisedb.com>
Teodor Sigaev <teodor@sigaev.ru>
Improvements from Heikki Linnakangas <heikki@enterprisedb.com> - change the alignment requirement of lexemes in TSVector slightly. Lexeme strings were always padded to 2-byte aligned length to make sure that if there's position array (uint16[]) it has the right alignment. The patch changes that so that the padding is not done when there's no positions. That makes the storage of tsvectors without positions slightly more compact. - added some #include "miscadmin.h" lines I missed in the earlier when I added calls to check_stack_depth(). - Reimplement the send/recv functions, and added a comment above them describing the on-wire format. The CRC is now recalculated in tsquery as well per previous discussion.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/tsginidx.c | modified | +3 −3 |
| src/backend/utils/adt/tsquery.c | modified | +120 −129 |
| src/backend/utils/adt/tsquery_cleanup.c | modified | +2 −1 |
| src/backend/utils/adt/tsquery_rewrite.c | modified | +2 −1 |
| src/backend/utils/adt/tsquery_util.c | modified | +2 −1 |
| src/backend/utils/adt/tsrank.c | modified | +4 −5 |
| src/backend/utils/adt/tsvector.c | modified | +106 −56 |
| src/backend/utils/adt/tsvector_op.c | modified | +27 −10 |
| src/include/tsearch/ts_type.h | modified | +20 −13 |