Remove obsolete comments about functional dependencies
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 26 Jul 2017 15:40:39 +0000 (11:40 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 26 Jul 2017 15:40:39 +0000 (11:40 -0400)
Initial submitted versions of the functional dependencies patch ignored
row groups that were smaller than a configured size.  However, that
consideration was removed in late stages of the patch just before
commit, but some comments referring to it remained.  Remove them to
avoid confusion.

Author: Atsushi Torikoshi
Discussion: https://postgr.es/m/7cfb23fc-4493-9c02-5da9-e505fd0115d2@lab.ntt.co.jp

src/backend/statistics/README.dependencies
src/backend/statistics/dependencies.c

index 702d34e3f8044e8e5625dc5adc19b4cf92fb1c57..6c446bde2748c159306fcf8e07be82034c86ca80 100644 (file)
@@ -71,10 +71,6 @@ To count the rows consistent with the dependency (a => b):
  (c) If there's a single distinct value in 'b', the rows are consistent with
      the functional dependency, otherwise they contradict it.
 
-The algorithm also requires a minimum size of the group to consider it
-consistent (currently 3 rows in the sample). Small groups make it less likely
-to break the consistency.
-
 
 Clause reduction (planner/optimizer)
 ------------------------------------
index 89dece335046a583b1c22c717972bfd357422bd0..2e7c0ad6ba61403eed83f8166711f7ac23556e86 100644 (file)
@@ -286,14 +286,6 @@ dependency_degree(int numrows, HeapTuple *rows, int k, AttrNumber *dependency,
     * first (k-1) columns. If there's a single value in the last column, we
     * count the group as 'supporting' the functional dependency. Otherwise we
     * count it as contradicting.
-    *
-    * We also require a group to have a minimum number of rows to be
-    * considered useful for supporting the dependency. Contradicting groups
-    * may be of any size, though.
-    *
-    * XXX The minimum size requirement makes it impossible to identify case
-    * when both columns are unique (or nearly unique), and therefore
-    * trivially functionally dependent.
     */
 
    /* start with the first row forming a group */