Fix ts_stat's failure on empty tsvector.

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

Commit: b14071164366e7efee9dc3a017eb7cb4cfac3428
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2009-10-13T14:33:14Z
Releases: 9.0.0
Fix ts_stat's failure on empty tsvector.
Also insert a couple of Asserts that check for stack overflow.
Bogus coding appears to be new in 8.4 --- older releases had a much
simpler algorithm here.  Per bug #5111.

Files

PathChange+/−
src/backend/utils/adt/tsvector_op.c modified +15 −10