Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c28e4f4

Browse files
committed
Remove obsolete comments about functional dependencies
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/[email protected]
1 parent 54dacc7 commit c28e4f4

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/backend/statistics/README.dependencies

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ To count the rows consistent with the dependency (a => b):
7171
(c) If there's a single distinct value in 'b', the rows are consistent with
7272
the functional dependency, otherwise they contradict it.
7373

74-
The algorithm also requires a minimum size of the group to consider it
75-
consistent (currently 3 rows in the sample). Small groups make it less likely
76-
to break the consistency.
77-
7874

7975
Clause reduction (planner/optimizer)
8076
------------------------------------

src/backend/statistics/dependencies.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,6 @@ dependency_degree(int numrows, HeapTuple *rows, int k, AttrNumber *dependency,
286286
* first (k-1) columns. If there's a single value in the last column, we
287287
* count the group as 'supporting' the functional dependency. Otherwise we
288288
* count it as contradicting.
289-
*
290-
* We also require a group to have a minimum number of rows to be
291-
* considered useful for supporting the dependency. Contradicting groups
292-
* may be of any size, though.
293-
*
294-
* XXX The minimum size requirement makes it impossible to identify case
295-
* when both columns are unique (or nearly unique), and therefore
296-
* trivially functionally dependent.
297289
*/
298290

299291
/* start with the first row forming a group */

0 commit comments

Comments
 (0)