postgresql/src
Tomas Vondra 2a307df1bb 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:44:01 +01:00
..
backend Fix ndistinct estimates with system attributes 2021-03-26 22:44:01 +01:00
bin Fix psql's \connect command some more. 2021-03-23 14:27:50 -04:00
common Replace use of sys_siglist[] with strsignal(). 2020-07-15 22:05:12 -04:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Use correct spelling of statistics kind 2021-03-23 04:56:17 +01:00
interfaces Re-simplify management of inStart in pqParseInput3's subroutines. 2021-03-11 14:43:45 -05:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
pl Further fix thinko in plpgsql memory leak fix. 2020-12-28 11:55:41 -05: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:41 -05:00
test Fix new TAP test for 2PC transactions and PITRs on Windows 2021-03-22 09:51:22 +09: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:40:27 -08:00
tutorial tutorial: land height is "elevation", not "altitude" 2021-03-10 20:25:18 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk