@@ -1159,7 +1159,7 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
11591159 ListCell * cell ,
11601160 * prev ,
11611161 * next ;
1162- Node * keyCol ;
1162+ Expr * keyCol ;
11631163 Oid operoid ;
11641164 bool need_relabel ,
11651165 list_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 */
11701170 if (key -> partattrs [0 ] != 0 )
1171- keyCol = (Node * ) makeVar (1 ,
1171+ keyCol = (Expr * ) makeVar (1 ,
11721172 key -> partattrs [0 ],
11731173 key -> parttypid [0 ],
11741174 key -> parttypmod [0 ],
11751175 key -> parttypcoll [0 ],
11761176 0 );
11771177 else
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 */
12071207 nulltest1 = makeNode (NullTest );
1208- nulltest1 -> arg = ( Expr * ) keyCol ;
1208+ nulltest1 -> arg = keyCol ;
12091209 nulltest1 -> nulltesttype = IS_NOT_NULL ;
12101210 nulltest1 -> argisrow = false;
12111211 nulltest1 -> 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 */
12181218 nulltest2 = makeNode (NullTest );
1219- nulltest2 -> arg = ( Expr * ) keyCol ;
1219+ nulltest2 -> arg = keyCol ;
12201220 nulltest2 -> nulltesttype = IS_NULL ;
12211221 nulltest2 -> argisrow = false;
12221222 nulltest2 -> location = -1 ;
@@ -1237,7 +1237,7 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
12371237 operoid = get_partition_operator (key , 0 , BTEqualStrategyNumber ,
12381238 & need_relabel );
12391239 if (need_relabel || key -> partcollation [0 ] != key -> parttypcoll [0 ])
1240- keyCol = (Node * ) makeRelabelType (( Expr * ) keyCol ,
1240+ keyCol = (Expr * ) makeRelabelType (keyCol ,
12411241 key -> partopcintype [0 ],
12421242 -1 ,
12431243 key -> partcollation [0 ],
@@ -1291,7 +1291,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
12911291 {
12921292 PartitionRangeDatum * ldatum = lfirst (cell1 ),
12931293 * udatum = lfirst (cell2 );
1294- Node * keyCol ;
1294+ Expr * keyCol ;
12951295 Const * lower_val = NULL ,
12961296 * upper_val = NULL ;
12971297 EState * estate ;
@@ -1307,7 +1307,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13071307 /* Left operand */
13081308 if (key -> partattrs [i ] != 0 )
13091309 {
1310- keyCol = (Node * ) makeVar (1 ,
1310+ keyCol = (Expr * ) makeVar (1 ,
13111311 key -> partattrs [i ],
13121312 key -> parttypid [i ],
13131313 key -> parttypmod [i ],
@@ -1316,7 +1316,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13161316 }
13171317 else
13181318 {
1319- keyCol = ( Node * ) copyObject (lfirst (partexprs_item ));
1319+ keyCol = copyObject (lfirst (partexprs_item ));
13201320 partexprs_item = lnext (partexprs_item );
13211321 }
13221322
@@ -1329,7 +1329,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13291329 if (!IsA (keyCol , Var ))
13301330 {
13311331 nulltest = makeNode (NullTest );
1332- nulltest -> arg = ( Expr * ) keyCol ;
1332+ nulltest -> arg = keyCol ;
13331333 nulltest -> nulltesttype = IS_NOT_NULL ;
13341334 nulltest -> argisrow = false;
13351335 nulltest -> location = -1 ;
@@ -1384,7 +1384,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13841384 elog (ERROR , "invalid range bound specification" );
13851385
13861386 if (need_relabel || key -> partcollation [i ] != key -> parttypcoll [i ])
1387- keyCol = (Node * ) makeRelabelType (( Expr * ) keyCol ,
1387+ keyCol = (Expr * ) makeRelabelType (keyCol ,
13881388 key -> partopcintype [i ],
13891389 -1 ,
13901390 key -> partcollation [i ],
@@ -1393,7 +1393,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
13931393 make_opclause (operoid ,
13941394 BOOLOID ,
13951395 false,
1396- ( Expr * ) keyCol ,
1396+ keyCol ,
13971397 (Expr * ) lower_val ,
13981398 InvalidOid ,
13991399 key -> partcollation [i ]));
@@ -1415,7 +1415,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
14151415 & need_relabel );
14161416
14171417 if (need_relabel || key -> partcollation [i ] != key -> parttypcoll [i ])
1418- keyCol = (Node * ) makeRelabelType (( Expr * ) keyCol ,
1418+ keyCol = (Expr * ) makeRelabelType (keyCol ,
14191419 key -> partopcintype [i ],
14201420 -1 ,
14211421 key -> partcollation [i ],
@@ -1424,7 +1424,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
14241424 make_opclause (operoid ,
14251425 BOOLOID ,
14261426 false,
1427- ( Expr * ) keyCol ,
1427+ keyCol ,
14281428 (Expr * ) lower_val ,
14291429 InvalidOid ,
14301430 key -> partcollation [i ]));
@@ -1437,7 +1437,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
14371437 & need_relabel );
14381438
14391439 if (need_relabel || key -> partcollation [i ] != key -> parttypcoll [i ])
1440- keyCol = (Node * ) makeRelabelType (( Expr * ) keyCol ,
1440+ keyCol = (Expr * ) makeRelabelType (keyCol ,
14411441 key -> partopcintype [i ],
14421442 -1 ,
14431443 key -> partcollation [i ],
@@ -1447,7 +1447,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
14471447 make_opclause (operoid ,
14481448 BOOLOID ,
14491449 false,
1450- ( Expr * ) keyCol ,
1450+ keyCol ,
14511451 (Expr * ) upper_val ,
14521452 InvalidOid ,
14531453 key -> partcollation [i ]));
0 commit comments