First cut at making useful selectivity estimates for range queries
Tom Lane <tgl@sss.pgh.pa.us>
First cut at making useful selectivity estimates for range queries (ie, WHERE x > lowbound AND x < highbound). It's not very bright yet but it does something useful. Also, rename intltsel/intgtsel to scalarltsel/scalargtsel to reflect usage better. Extend convert_to_scalar to do something a little bit useful with string data types. Still need to make it do something with date/time datatypes, but I'll wait for Thomas's datetime unification dust to settle first. Eventually the routine ought not have any type-specific knowledge at all; it ought to be calling a type-dependent routine found via a pg_type column; but that's a task for another day.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/xindex.sgml | modified | +5 −5 |
| doc/src/sgml/xoper.sgml | modified | +15 −4 |
| src/backend/optimizer/path/clausesel.c | modified | +235 −10 |
| src/backend/utils/adt/selfuncs.c | modified | +110 −64 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_operator.h | modified | +135 −135 |
| src/include/catalog/pg_proc.h | modified | +15 −15 |
| src/include/utils/builtins.h | modified | +6 −5 |
| src/tutorial/complex.source | modified | +5 −7 |