Improve make_tsvector() to handle empty input, and simplify its callers.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 04a2c7f412d01da8100de79b13df4fd39e15ce25
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2017-07-18T17:13:47Z
Releases: 10.0
Improve make_tsvector() to handle empty input, and simplify its callers.

It seemed a bit silly that each caller of make_tsvector() was laboriously
special-casing the situation where no lexemes were found, when it would
be easy and much more bullet-proof to make make_tsvector() handle that.

Files

PathChange+/−
src/backend/tsearch/to_tsany.c modified +19 −39
src/backend/utils/adt/tsvector_op.c modified +9 −22