postgresql/src/backend/utils
Tom Lane a391ff3c3d Build out the planner support function infrastructure.
Add support function requests for estimating the selectivity, cost,
and number of result rows (if a SRF) of the target function.

The lack of a way to estimate selectivity of a boolean-returning
function in WHERE has been a recognized deficiency of the planner
since Berkeley days.  This commit finally fixes it.

In addition, non-constant estimates of cost and number of output
rows are now possible.  We still fall back to looking at procost
and prorows if the support function doesn't service the request,
of course.

To make concrete use of the possibility of estimating output rowcount
for SRFs, this commit adds support functions for array_unnest(anyarray)
and the integer variants of generate_series; the lack of plausible
rowcount estimates for those, even when it's obvious to a human,
has been a repeated subject of complaints.  Obviously, much more
could now be done in this line, but I'm mostly just trying to get
the infrastructure in place.

Discussion: https://postgr.es/m/15193.1548028093@sss.pgh.pa.us
2019-02-09 18:32:23 -05:00
..
adt Build out the planner support function infrastructure. 2019-02-09 18:32:23 -05:00
cache Build out the planner support function infrastructure. 2019-02-09 18:32:23 -05:00
error Update copyright for 2019 2019-01-02 12:44:25 -05:00
fmgr Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
hash Update copyright for 2019 2019-01-02 12:44:25 -05:00
init Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
mb Fix comments that claimed that mblen() only looks at first byte. 2019-01-25 14:54:38 +02:00
misc Allow some recovery parameters to be changed with reload 2019-02-07 08:34:48 +01:00
mmgr Update copyright for 2019 2019-01-02 12:44:25 -05:00
resowner Update copyright for 2019 2019-01-02 12:44:25 -05:00
sort Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
time Move remaining code from tqual.[ch] to heapam.h / heapam_visibility.c. 2019-01-21 17:07:10 -08:00
.gitignore Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
errcodes.txt Update copyright for 2019 2019-01-02 12:44:25 -05:00
Gen_dummy_probes.pl Update copyright for 2019 2019-01-02 12:44:25 -05:00
Gen_dummy_probes.sed Update copyright for 2019 2019-01-02 12:44:25 -05:00
Gen_fmgrtab.pl Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
generate-errcodes.pl Update copyright for 2019 2019-01-02 12:44:25 -05:00
Makefile Use symbolic references for pg_language OIDs in the bootstrap data. 2019-01-03 18:38:49 -05:00
probes.d Update copyright for 2019 2019-01-02 12:44:25 -05:00