@@ -1159,7 +1159,7 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
11591159ListCell * cell ,
11601160* prev ,
11611161* next ;
1162- Node * keyCol ;
1162+ Expr * keyCol ;
11631163Oid operoid ;
11641164bool need_relabel ,
11651165list_has_null = false;
@@ -1168,14 +1168,14 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
11681168
11691169/* Left operand is either a simple Var or arbitrary expression */
11701170if (key -> partattrs [0 ]!= 0 )
1171- keyCol = (Node * )makeVar (1 ,
1171+ keyCol = (Expr * )makeVar (1 ,
11721172key -> partattrs [0 ],
11731173key -> parttypid [0 ],
11741174key -> parttypmod [0 ],
11751175key -> parttypcoll [0 ],
117611760 );
11771177else
1178- keyCol = (Node * )copyObject (linitial (key -> partexprs ));
1178+ keyCol = (Expr * )copyObject (linitial (key -> partexprs ));
11791179
11801180/*
11811181 * We must remove any NULL value in the list; we handle it separately
@@ -1205,7 +1205,7 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
12051205 * expressions
12061206 */
12071207nulltest1 = makeNode (NullTest );
1208- nulltest1 -> arg = ( Expr * ) keyCol ;
1208+ nulltest1 -> arg = keyCol ;
12091209nulltest1 -> nulltesttype = IS_NOT_NULL ;
12101210nulltest1 -> argisrow = false;
12111211nulltest1 -> location = -1 ;
@@ -1216,7 +1216,7 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
12161216 * Gin up a col IS NULL test that will be OR'd with other expressions
12171217 */
12181218nulltest2 = makeNode (NullTest );
1219- nulltest2 -> arg = ( Expr * ) keyCol ;
1219+ nulltest2 -> arg = keyCol ;
12201220nulltest2 -> nulltesttype = IS_NULL ;
12211221nulltest2 -> argisrow = false;
12221222nulltest2 -> location = -1 ;
@@ -1237,7 +1237,7 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
12371237operoid = get_partition_operator (key ,0 ,BTEqualStrategyNumber ,
12381238& need_relabel );
12391239if (need_relabel || key -> partcollation [0 ]!= key -> parttypcoll [0 ])
1240- keyCol = (Node * )makeRelabelType (( Expr * ) keyCol ,
1240+ keyCol = (Expr * )makeRelabelType (keyCol ,
12411241key -> partopcintype [0 ],
12421242-1 ,
12431243key -> partcollation [0 ],
@@ -1291,7 +1291,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
12911291{
12921292PartitionRangeDatum * ldatum = lfirst (cell1 ),
12931293* udatum = lfirst (cell2 );
1294- Node * keyCol ;
1294+ Expr * keyCol ;
12951295Const * lower_val = NULL ,
12961296* upper_val = NULL ;
12971297EState * estate ;
@@ -1307,7 +1307,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13071307/* Left operand */
13081308if (key -> partattrs [i ]!= 0 )
13091309{
1310- keyCol = (Node * )makeVar (1 ,
1310+ keyCol = (Expr * )makeVar (1 ,
13111311key -> partattrs [i ],
13121312key -> parttypid [i ],
13131313key -> parttypmod [i ],
@@ -1316,7 +1316,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13161316}
13171317else
13181318{
1319- keyCol = ( Node * ) copyObject (lfirst (partexprs_item ));
1319+ keyCol = copyObject (lfirst (partexprs_item ));
13201320partexprs_item = lnext (partexprs_item );
13211321}
13221322
@@ -1329,7 +1329,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13291329if (!IsA (keyCol ,Var ))
13301330{
13311331nulltest = makeNode (NullTest );
1332- nulltest -> arg = ( Expr * ) keyCol ;
1332+ nulltest -> arg = keyCol ;
13331333nulltest -> nulltesttype = IS_NOT_NULL ;
13341334nulltest -> argisrow = false;
13351335nulltest -> location = -1 ;
@@ -1384,7 +1384,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13841384elog (ERROR ,"invalid range bound specification" );
13851385
13861386if (need_relabel || key -> partcollation [i ]!= key -> parttypcoll [i ])
1387- keyCol = (Node * )makeRelabelType (( Expr * ) keyCol ,
1387+ keyCol = (Expr * )makeRelabelType (keyCol ,
13881388key -> partopcintype [i ],
13891389-1 ,
13901390key -> partcollation [i ],
@@ -1393,7 +1393,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13931393make_opclause (operoid ,
13941394BOOLOID ,
13951395 false,
1396- ( Expr * ) keyCol ,
1396+ keyCol ,
13971397 (Expr * )lower_val ,
13981398InvalidOid ,
13991399key -> partcollation [i ]));
@@ -1415,7 +1415,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
14151415& need_relabel );
14161416
14171417if (need_relabel || key -> partcollation [i ]!= key -> parttypcoll [i ])
1418- keyCol = (Node * )makeRelabelType (( Expr * ) keyCol ,
1418+ keyCol = (Expr * )makeRelabelType (keyCol ,
14191419key -> partopcintype [i ],
14201420-1 ,
14211421key -> partcollation [i ],
@@ -1424,7 +1424,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
14241424make_opclause (operoid ,
14251425BOOLOID ,
14261426 false,
1427- ( Expr * ) keyCol ,
1427+ keyCol ,
14281428 (Expr * )lower_val ,
14291429InvalidOid ,
14301430key -> partcollation [i ]));
@@ -1437,7 +1437,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
14371437& need_relabel );
14381438
14391439if (need_relabel || key -> partcollation [i ]!= key -> parttypcoll [i ])
1440- keyCol = (Node * )makeRelabelType (( Expr * ) keyCol ,
1440+ keyCol = (Expr * )makeRelabelType (keyCol ,
14411441key -> partopcintype [i ],
14421442-1 ,
14431443key -> partcollation [i ],
@@ -1447,7 +1447,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
14471447make_opclause (operoid ,
14481448BOOLOID ,
14491449 false,
1450- ( Expr * ) keyCol ,
1450+ keyCol ,
14511451 (Expr * )upper_val ,
14521452InvalidOid ,
14531453key -> partcollation [i ]));