Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2119b52

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 parent12d5c30 commit2119b52

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

‎src/backend/nodes/copyfuncs.c

Lines changed: 20 additions & 2 deletions
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
returnnewnode;
14671467
}
14681468

1469+
#ifFALSE
1470+
staticGroupClause*
1471+
_copyGroupClause(GroupClause*from)
1472+
{
1473+
GroupClause*newnode=makeNode(GroupClause);
1474+
1475+
Node_Copy(from,newnode,resdom);
1476+
newnode->opoid=from->opoid;
1477+
1478+
returnnewnode;
1479+
}
1480+
#endif
1481+
14691482
staticA_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
caseT_SortClause:
17641777
retval=_copySortClause(from);
17651778
break;
1779+
#ifFALSE
1780+
caseT_GroupClause:
1781+
retval=_copyGroupClause(from);
1782+
break;
1783+
#endif
17661784
caseT_A_Const:
17671785
retval=_copyAConst(from);
17681786
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp