Re: multivariate statistics (v19)
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Dean Rasheed <dean.a.rasheed@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>, Michael Paquier <michael.paquier@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Tatsuo Ishii <ishii@postgresql.org>, David Steele <david@pgmasters.net>, Tom Lane <tgl@sss.pgh.pa.us>, Petr Jelinek <petr@2ndquadrant.com>, Jeff Janes <jeff.janes@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-01-30T16:55:55Z
Lists: pgsql-hackers
Minor nitpicks: Let me suggest to use get_attnum() in CreateStatistics instead of SearchSysCacheAttName for each column. Also, we use type AttrNumber for attribute numbers rather than int16. Finally in the same function you have an erroneous ERRCODE_UNDEFINED_COLUMN which should be ERRCODE_DUPLICATE_COLUMN in the loop that searches for duplicates. May I suggest that compare_int16 be named attnum_cmp (just to be consistent with other qsort comparators) and look like return *((const AttrNumber *) a) - *((const AttrNumber *) b); instead of memcmp? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Collect and use multi-column dependency stats
- 2686ee1b7ccf 10.0 landed
-
Implement SortSupport for macaddr data type
- f90d23d0c518 10.0 cited
-
Implement multivariate n-distinct coefficients
- 7b504eb282ca 10.0 landed
-
Generate fmgr prototypes automatically
- 352a24a1f9d6 10.0 cited