postgresql/src
Tom Lane c9e845f82a Tweak tsmatchsel() so that it examines the structure of the tsquery whenever
possible (ie, whenever the tsquery is a constant), even when no statistics
are available for the tsvector.  For example, foo @@ 'a & b'::tsquery
can be expected to be more selective than foo @@ 'a'::tsquery, whether
or not we know anything about foo.  We use DEFAULT_TS_MATCH_SEL as the assumed
selectivity of individual query terms when no stats are available, then
combine the terms according to the query's AND/OR structure as usual.

Per experimentation with Artur Dabrowski's example.  (The fact that there
are no stats available in that example is a problem in itself, but
nonetheless tsmatchsel should be smarter about the case.)

Back-patch to 8.4 to keep all versions of tsmatchsel() in sync.
2010-07-31 03:27:48 +00:00
..
backend Tweak tsmatchsel() so that it examines the structure of the tsquery whenever 2010-07-31 03:27:48 +00:00
bin Translation updates for 9.0beta4 2010-07-29 19:39:47 +00:00
include Rewrite the key-combination logic in GIN's keyGetItem() and scanGetItem() 2010-07-31 00:31:04 +00:00
interfaces Translation updates for 9.0beta4 2010-07-29 19:39:47 +00:00
makefiles Allow for LDFLAGS_SL already having a value in Makefile.aix. 2010-07-06 03:41:02 +00:00
pl Translation updates for 9.0beta4 2010-07-29 19:39:47 +00:00
port pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
template Split the LDFLAGS make variable into two parts: LDFLAGS is now used for 2010-07-05 18:54:38 +00:00
test Fix potential failure when hashing the output of a subplan that produces 2010-07-28 04:50:59 +00:00
timezone pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
tools Mention why one C file fails pgindent. 2010-07-06 19:26:28 +00:00
tutorial Remove copyright mention of Andrew Yu, per author's permission. 2010-02-02 18:52:02 +00:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Rethink the way walreceiver is linked into the backend. Instead than shoving 2010-01-20 09:16:24 +00:00
Makefile.global.in Accept slightly grotty coding in Makefile.global in order to keep the -L 2010-07-06 22:03:05 +00:00
Makefile.shlib Still more third thoughts: when linking shared libraries, LDFLAGS probably 2010-07-06 03:55:33 +00:00
nls-global.mk Avoid error from mkdir if no languages are to be installed 2010-05-13 14:35:28 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00