Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2119b52

Browse files
author
Thomas G. Lockhart
committed
Fix numeric comparision (... != NULL) to be (... > 0). gcc is happier now.
Add non-working code which is commented-out to copy GroupClause structures.
1 parent 12d5c30 commit 2119b52

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/backend/nodes/copyfuncs.c

+20-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.22 1997/12/18 19:46:37 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.23 1997/12/23 19:53:30 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1466,6 +1466,19 @@ _copySortClause(SortClause *from)
14661466
return newnode;
14671467
}
14681468

1469+
#if FALSE
1470+
static GroupClause *
1471+
_copyGroupClause(GroupClause *from)
1472+
{
1473+
GroupClause *newnode = makeNode(GroupClause);
1474+
1475+
Node_Copy(from, newnode, resdom);
1476+
newnode->opoid = from->opoid;
1477+
1478+
return newnode;
1479+
}
1480+
#endif
1481+
14691482
static A_Const *
14701483
_copyAConst(A_Const *from)
14711484
{
@@ -1542,7 +1555,7 @@ _copyQuery(Query *from)
15421555
Node_Copy(from, newnode, havingQual); /* currently ignored */
15431556

15441557
newnode->qry_numAgg = from->qry_numAgg;
1545-
if (from->qry_numAgg != NULL)
1558+
if (from->qry_numAgg > 0)
15461559
{
15471560
newnode->qry_aggs =
15481561
(Aggreg **) palloc(sizeof(Aggreg *) * from->qry_numAgg);
@@ -1763,6 +1776,11 @@ copyObject(void *from)
17631776
case T_SortClause:
17641777
retval = _copySortClause(from);
17651778
break;
1779+
#if FALSE
1780+
case T_GroupClause:
1781+
retval = _copyGroupClause(from);
1782+
break;
1783+
#endif
17661784
case T_A_Const:
17671785
retval = _copyAConst(from);
17681786
break;

0 commit comments

Comments
 (0)