On 2018/11/20 15:58, Tom Lane wrote: > Michael Paquier <mich...@paquier.xyz> writes: >> On Tue, Nov 20, 2018 at 02:00:39PM +0900, Amit Langote wrote: >>> - * We also use EquivalenceClasses as the base structure for PathKeys, >>> letting >>> + * We also use EquivalenceClass as the base structure for PathKeys, letting > >> ... But not that. > > The reason that's not good is that it creates a singular-plural mismatch.
Hmm, yeah. > If you'd also changed "PathKeys" to "PathKey", it would still read OK, > though I don't think it's an improvement particularly. So, - * We also use EquivalenceClasses as the base structure for PathKeys, + * We also use EquivalenceClass as the base structure for PathKey, > (Hm ... though arguably, "structure" should be "structures" if we're > going to let it stand as plural.) vs. - * We also use EquivalenceClasses as the base structure for PathKeys, + * We also use EquivalenceClasses as the base structures for PathKeys, If I'm understanding this right, aren't different orderings represented by different PathKey nodes considered equivalent if they share the base EquivalenceClass? If that's the case, I think the former reads better. Thanks, Amit
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 6fd24203dd..ab71ba9674 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -863,7 +863,7 @@ typedef struct StatisticExtInfo } StatisticExtInfo; /* - * EquivalenceClasses + * EquivalenceClass * * Whenever we can determine that a mergejoinable equality clause A = B is * not delayed by any outer join, we create an EquivalenceClass containing @@ -880,7 +880,7 @@ typedef struct StatisticExtInfo * that all or none of the input datatypes are collatable, so that a single * collation value is sufficient.) * - * We also use EquivalenceClasses as the base structure for PathKeys, letting + * We also use EquivalenceClass as the base structure for PathKey, letting * us represent knowledge about different sort orderings being equivalent. * Since every PathKey must reference an EquivalenceClass, we will end up * with single-member EquivalenceClasses whenever a sort key expression has