@@ -1159,7 +1159,7 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
1159
1159
ListCell * cell ,
1160
1160
* prev ,
1161
1161
* next ;
1162
- Node * keyCol ;
1162
+ Expr * keyCol ;
1163
1163
Oid operoid ;
1164
1164
bool need_relabel ,
1165
1165
list_has_null = false;
@@ -1168,14 +1168,14 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
1168
1168
1169
1169
/* Left operand is either a simple Var or arbitrary expression */
1170
1170
if (key -> partattrs [0 ] != 0 )
1171
- keyCol = (Node * ) makeVar (1 ,
1171
+ keyCol = (Expr * ) makeVar (1 ,
1172
1172
key -> partattrs [0 ],
1173
1173
key -> parttypid [0 ],
1174
1174
key -> parttypmod [0 ],
1175
1175
key -> parttypcoll [0 ],
1176
1176
0 );
1177
1177
else
1178
- keyCol = (Node * ) copyObject (linitial (key -> partexprs ));
1178
+ keyCol = (Expr * ) copyObject (linitial (key -> partexprs ));
1179
1179
1180
1180
/*
1181
1181
* 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)
1205
1205
* expressions
1206
1206
*/
1207
1207
nulltest1 = makeNode (NullTest );
1208
- nulltest1 -> arg = ( Expr * ) keyCol ;
1208
+ nulltest1 -> arg = keyCol ;
1209
1209
nulltest1 -> nulltesttype = IS_NOT_NULL ;
1210
1210
nulltest1 -> argisrow = false;
1211
1211
nulltest1 -> location = -1 ;
@@ -1216,7 +1216,7 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
1216
1216
* Gin up a col IS NULL test that will be OR'd with other expressions
1217
1217
*/
1218
1218
nulltest2 = makeNode (NullTest );
1219
- nulltest2 -> arg = ( Expr * ) keyCol ;
1219
+ nulltest2 -> arg = keyCol ;
1220
1220
nulltest2 -> nulltesttype = IS_NULL ;
1221
1221
nulltest2 -> argisrow = false;
1222
1222
nulltest2 -> location = -1 ;
@@ -1237,7 +1237,7 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
1237
1237
operoid = get_partition_operator (key , 0 , BTEqualStrategyNumber ,
1238
1238
& need_relabel );
1239
1239
if (need_relabel || key -> partcollation [0 ] != key -> parttypcoll [0 ])
1240
- keyCol = (Node * ) makeRelabelType (( Expr * ) keyCol ,
1240
+ keyCol = (Expr * ) makeRelabelType (keyCol ,
1241
1241
key -> partopcintype [0 ],
1242
1242
-1 ,
1243
1243
key -> partcollation [0 ],
@@ -1291,7 +1291,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1291
1291
{
1292
1292
PartitionRangeDatum * ldatum = lfirst (cell1 ),
1293
1293
* udatum = lfirst (cell2 );
1294
- Node * keyCol ;
1294
+ Expr * keyCol ;
1295
1295
Const * lower_val = NULL ,
1296
1296
* upper_val = NULL ;
1297
1297
EState * estate ;
@@ -1307,7 +1307,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1307
1307
/* Left operand */
1308
1308
if (key -> partattrs [i ] != 0 )
1309
1309
{
1310
- keyCol = (Node * ) makeVar (1 ,
1310
+ keyCol = (Expr * ) makeVar (1 ,
1311
1311
key -> partattrs [i ],
1312
1312
key -> parttypid [i ],
1313
1313
key -> parttypmod [i ],
@@ -1316,7 +1316,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1316
1316
}
1317
1317
else
1318
1318
{
1319
- keyCol = ( Node * ) copyObject (lfirst (partexprs_item ));
1319
+ keyCol = copyObject (lfirst (partexprs_item ));
1320
1320
partexprs_item = lnext (partexprs_item );
1321
1321
}
1322
1322
@@ -1329,7 +1329,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1329
1329
if (!IsA (keyCol , Var ))
1330
1330
{
1331
1331
nulltest = makeNode (NullTest );
1332
- nulltest -> arg = ( Expr * ) keyCol ;
1332
+ nulltest -> arg = keyCol ;
1333
1333
nulltest -> nulltesttype = IS_NOT_NULL ;
1334
1334
nulltest -> argisrow = false;
1335
1335
nulltest -> location = -1 ;
@@ -1384,7 +1384,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1384
1384
elog (ERROR , "invalid range bound specification" );
1385
1385
1386
1386
if (need_relabel || key -> partcollation [i ] != key -> parttypcoll [i ])
1387
- keyCol = (Node * ) makeRelabelType (( Expr * ) keyCol ,
1387
+ keyCol = (Expr * ) makeRelabelType (keyCol ,
1388
1388
key -> partopcintype [i ],
1389
1389
-1 ,
1390
1390
key -> partcollation [i ],
@@ -1393,7 +1393,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1393
1393
make_opclause (operoid ,
1394
1394
BOOLOID ,
1395
1395
false,
1396
- ( Expr * ) keyCol ,
1396
+ keyCol ,
1397
1397
(Expr * ) lower_val ,
1398
1398
InvalidOid ,
1399
1399
key -> partcollation [i ]));
@@ -1415,7 +1415,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1415
1415
& need_relabel );
1416
1416
1417
1417
if (need_relabel || key -> partcollation [i ] != key -> parttypcoll [i ])
1418
- keyCol = (Node * ) makeRelabelType (( Expr * ) keyCol ,
1418
+ keyCol = (Expr * ) makeRelabelType (keyCol ,
1419
1419
key -> partopcintype [i ],
1420
1420
-1 ,
1421
1421
key -> partcollation [i ],
@@ -1424,7 +1424,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1424
1424
make_opclause (operoid ,
1425
1425
BOOLOID ,
1426
1426
false,
1427
- ( Expr * ) keyCol ,
1427
+ keyCol ,
1428
1428
(Expr * ) lower_val ,
1429
1429
InvalidOid ,
1430
1430
key -> partcollation [i ]));
@@ -1437,7 +1437,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1437
1437
& need_relabel );
1438
1438
1439
1439
if (need_relabel || key -> partcollation [i ] != key -> parttypcoll [i ])
1440
- keyCol = (Node * ) makeRelabelType (( Expr * ) keyCol ,
1440
+ keyCol = (Expr * ) makeRelabelType (keyCol ,
1441
1441
key -> partopcintype [i ],
1442
1442
-1 ,
1443
1443
key -> partcollation [i ],
@@ -1447,7 +1447,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
1447
1447
make_opclause (operoid ,
1448
1448
BOOLOID ,
1449
1449
false,
1450
- ( Expr * ) keyCol ,
1450
+ keyCol ,
1451
1451
(Expr * ) upper_val ,
1452
1452
InvalidOid ,
1453
1453
key -> partcollation [i ]));
0 commit comments