Skip to content

Commit ca0f143

Browse files
committed
Hmm, equalfuncs didn't know about SortClause or GroupClause
nodes...
1 parent 4403591 commit ca0f143

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/backend/nodes/equalfuncs.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.57 2000/01/27 18:11:28 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.58 2000/01/31 01:21:39 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -655,6 +655,17 @@ _equalRangeTblEntry(RangeTblEntry *a, RangeTblEntry *b)
655655
return true;
656656
}
657657

658+
static bool
659+
_equalSortClause(SortClause *a, SortClause *b)
660+
{
661+
if (a->tleSortGroupRef != b->tleSortGroupRef)
662+
return false;
663+
if (a->sortop != b->sortop)
664+
return false;
665+
666+
return true;
667+
}
668+
658669
static bool
659670
_equalTargetEntry(TargetEntry *a, TargetEntry *b)
660671
{
@@ -863,6 +874,13 @@ equal(void *a, void *b)
863874
case T_RangeTblEntry:
864875
retval = _equalRangeTblEntry(a, b);
865876
break;
877+
case T_SortClause:
878+
retval = _equalSortClause(a, b);
879+
break;
880+
case T_GroupClause:
881+
/* GroupClause is equivalent to SortClause */
882+
retval = _equalSortClause(a, b);
883+
break;
866884
case T_TargetEntry:
867885
retval = _equalTargetEntry(a, b);
868886
break;

0 commit comments

Comments
 (0)