Commit ca0f1435 authored by Tom Lane's avatar Tom Lane

Hmm, equalfuncs didn't know about SortClause or GroupClause

nodes...
parent 44035918
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.57 2000/01/27 18:11:28 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.58 2000/01/31 01:21:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -655,6 +655,17 @@ _equalRangeTblEntry(RangeTblEntry *a, RangeTblEntry *b)
return true;
}
static bool
_equalSortClause(SortClause *a, SortClause *b)
{
if (a->tleSortGroupRef != b->tleSortGroupRef)
return false;
if (a->sortop != b->sortop)
return false;
return true;
}
static bool
_equalTargetEntry(TargetEntry *a, TargetEntry *b)
{
......@@ -863,6 +874,13 @@ equal(void *a, void *b)
case T_RangeTblEntry:
retval = _equalRangeTblEntry(a, b);
break;
case T_SortClause:
retval = _equalSortClause(a, b);
break;
case T_GroupClause:
/* GroupClause is equivalent to SortClause */
retval = _equalSortClause(a, b);
break;
case T_TargetEntry:
retval = _equalTargetEntry(a, b);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment