postgresql/src
Tomas Vondra 88acb01357 Fix ndistinct estimates with system attributes
When estimating the number of groups using extended statistics, the code
was discarding information about system attributes. This led to strange
situation that

    SELECT 1 FROM t GROUP BY ctid;

could have produced higher estimate (equal to pg_class.reltuples) than

    SELECT 1 FROM t GROUP BY a, b, ctid;

with extended statistics on (a,b). Fixed by retaining information about
the system attribute.

Backpatch all the way to 10, where extended statistics were introduced.

Author: Tomas Vondra
Backpatch-through: 10
2021-03-26 22:40:00 +01:00
..
backend Fix ndistinct estimates with system attributes 2021-03-26 22:40:00 +01:00
bin Fix psql's \connect command some more. 2021-03-23 14:27:50 -04:00
common Fix command-line colorization on Windows with VT100-compatible environments 2020-03-02 15:46:24 +09:00
fe_utils
include Use correct spelling of statistics kind 2021-03-23 04:57:45 +01:00
interfaces Re-simplify management of inStart in pqParseInput3's subroutines. 2021-03-11 14:43:45 -05:00
makefiles
pl Translation updates 2021-02-08 17:50:22 +01:00
port pg_attribute_no_sanitize_alignment() macro 2021-02-13 17:49:08 -05:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:35 -05:00
test Fix ndistinct estimates with system attributes 2021-03-26 22:40:00 +01:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools backpatch "jit: Add support for LLVM 12." 2020-12-07 18:39:32 -08:00
tutorial tutorial: land height is "elevation", not "altitude" 2021-03-10 20:25:18 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in
Makefile.shlib
nls-global.mk