Commit 2119b523 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Fix numeric comparision (... != NULL) to be (... > 0). gcc is happier now.

Add non-working code which is commented-out to copy GroupClause structures.
parent 12d5c30c
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.22 1997/12/18 19:46:37 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.23 1997/12/23 19:53:30 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1466,6 +1466,19 @@ _copySortClause(SortClause *from) ...@@ -1466,6 +1466,19 @@ _copySortClause(SortClause *from)
return newnode; return newnode;
} }
#if FALSE
static GroupClause *
_copyGroupClause(GroupClause *from)
{
GroupClause *newnode = makeNode(GroupClause);
Node_Copy(from, newnode, resdom);
newnode->opoid = from->opoid;
return newnode;
}
#endif
static A_Const * static A_Const *
_copyAConst(A_Const *from) _copyAConst(A_Const *from)
{ {
...@@ -1542,7 +1555,7 @@ _copyQuery(Query *from) ...@@ -1542,7 +1555,7 @@ _copyQuery(Query *from)
Node_Copy(from, newnode, havingQual); /* currently ignored */ Node_Copy(from, newnode, havingQual); /* currently ignored */
newnode->qry_numAgg = from->qry_numAgg; newnode->qry_numAgg = from->qry_numAgg;
if (from->qry_numAgg != NULL) if (from->qry_numAgg > 0)
{ {
newnode->qry_aggs = newnode->qry_aggs =
(Aggreg **) palloc(sizeof(Aggreg *) * from->qry_numAgg); (Aggreg **) palloc(sizeof(Aggreg *) * from->qry_numAgg);
...@@ -1763,6 +1776,11 @@ copyObject(void *from) ...@@ -1763,6 +1776,11 @@ copyObject(void *from)
case T_SortClause: case T_SortClause:
retval = _copySortClause(from); retval = _copySortClause(from);
break; break;
#if FALSE
case T_GroupClause:
retval = _copyGroupClause(from);
break;
#endif
case T_A_Const: case T_A_Const:
retval = _copyAConst(from); retval = _copyAConst(from);
break; 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