mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-07 12:20:31 +01:00
Remove useless casts to (void *)
Many of them just seem to have been copied around for no real reason. Their presence causes (small) risks of hiding actual type mismatches or silently discarding qualifiers Discussion: https://www.postgresql.org/message-id/flat/461ea37c-8b58-43b4-9736-52884e862820@eisentraut.org
This commit is contained in:
parent
97525bc5c8
commit
7f798aca1d
|
|
@ -719,7 +719,7 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
|
|||
RelationGetRelationName(state->heaprel));
|
||||
|
||||
table_index_build_scan(state->heaprel, state->rel, indexinfo, true, false,
|
||||
bt_tuple_present_callback, (void *) state, scan);
|
||||
bt_tuple_present_callback, state, scan);
|
||||
|
||||
ereport(DEBUG1,
|
||||
(errmsg_internal("finished verifying presence of " INT64_FORMAT " tuples from table \"%s\" with bitset %.2f%% set",
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
|||
|
||||
/* Do the heap scan */
|
||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||
bloomBuildCallback, (void *) &buildstate,
|
||||
bloomBuildCallback, &buildstate,
|
||||
NULL);
|
||||
|
||||
/* Flush last page if needed (it will be, unless heap was empty) */
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ initBloomState(BloomState *state, Relation index)
|
|||
|
||||
UnlockReleaseBuffer(buffer);
|
||||
|
||||
index->rd_amcache = (void *) opts;
|
||||
index->rd_amcache = opts;
|
||||
}
|
||||
|
||||
memcpy(&state->opts, index->rd_amcache, sizeof(state->opts));
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ Datum
|
|||
gbt_bit_consistent(PG_FUNCTION_ARGS)
|
||||
{
|
||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||
void *query = (void *) DatumGetByteaP(PG_GETARG_DATUM(1));
|
||||
void *query = DatumGetByteaP(PG_GETARG_DATUM(1));
|
||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||
|
||||
/* Oid subtype = PG_GETARG_OID(3); */
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ gbt_bool_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ gbt_bool_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(boolKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(boolKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ Datum
|
|||
gbt_bytea_consistent(PG_FUNCTION_ARGS)
|
||||
{
|
||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||
void *query = (void *) DatumGetByteaP(PG_GETARG_DATUM(1));
|
||||
void *query = DatumGetByteaP(PG_GETARG_DATUM(1));
|
||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||
|
||||
/* Oid subtype = PG_GETARG_OID(3); */
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ gbt_cash_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo,
|
||||
fcinfo->flinfo));
|
||||
}
|
||||
|
|
@ -169,7 +169,7 @@ gbt_cash_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ gbt_cash_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(cashKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(cashKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ gbt_date_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo,
|
||||
fcinfo->flinfo));
|
||||
}
|
||||
|
|
@ -186,7 +186,7 @@ gbt_date_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ gbt_date_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(dateKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(dateKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ gbt_enum_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo,
|
||||
fcinfo->flinfo));
|
||||
}
|
||||
|
|
@ -149,7 +149,7 @@ gbt_enum_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(oidKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ gbt_float4_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo,
|
||||
fcinfo->flinfo));
|
||||
}
|
||||
|
|
@ -164,7 +164,7 @@ gbt_float4_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ gbt_float4_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(float4KEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(float4KEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ gbt_float8_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo,
|
||||
fcinfo->flinfo));
|
||||
}
|
||||
|
|
@ -171,7 +171,7 @@ gbt_float8_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ gbt_float8_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(float8KEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(float8KEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ gbt_inet_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query,
|
||||
&strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ gbt_inet_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(inetKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(inetKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ gbt_int2_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ gbt_int2_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ gbt_int2_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(int16KEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(int16KEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ gbt_int4_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ gbt_int4_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ gbt_int4_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(int32KEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(int32KEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ gbt_int8_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ gbt_int8_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ gbt_int8_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(int64KEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(int64KEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ gbt_intv_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ gbt_intv_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ gbt_intv_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(intvKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(intvKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ gbt_macad_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ gbt_macad_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc0(sizeof(macKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(macKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ gbt_macad8_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ gbt_macad8_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc0(sizeof(mac8KEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(mac8KEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ Datum
|
|||
gbt_numeric_consistent(PG_FUNCTION_ARGS)
|
||||
{
|
||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||
void *query = (void *) DatumGetNumeric(PG_GETARG_DATUM(1));
|
||||
void *query = DatumGetNumeric(PG_GETARG_DATUM(1));
|
||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||
|
||||
/* Oid subtype = PG_GETARG_OID(3); */
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ gbt_oid_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ gbt_oid_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ gbt_oid_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(oidKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ Datum
|
|||
gbt_text_consistent(PG_FUNCTION_ARGS)
|
||||
{
|
||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||
void *query = (void *) DatumGetTextP(PG_GETARG_DATUM(1));
|
||||
void *query = DatumGetTextP(PG_GETARG_DATUM(1));
|
||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||
|
||||
/* Oid subtype = PG_GETARG_OID(3); */
|
||||
|
|
@ -221,7 +221,7 @@ Datum
|
|||
gbt_bpchar_consistent(PG_FUNCTION_ARGS)
|
||||
{
|
||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||
void *query = (void *) DatumGetTextP(PG_GETARG_DATUM(1));
|
||||
void *query = DatumGetTextP(PG_GETARG_DATUM(1));
|
||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||
|
||||
/* Oid subtype = PG_GETARG_OID(3); */
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ gbt_time_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ gbt_time_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ gbt_timetz_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &qqq, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ gbt_time_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(timeKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(timeKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ gbt_ts_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -282,7 +282,7 @@ gbt_ts_distance(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -306,7 +306,7 @@ gbt_tstz_consistent(PG_FUNCTION_ARGS)
|
|||
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
|
||||
qqq = tstz_to_ts_gmt(query);
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, &qqq, &strategy,
|
||||
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ gbt_tstz_distance(PG_FUNCTION_ARGS)
|
|||
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
|
||||
qqq = tstz_to_ts_gmt(query);
|
||||
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &qqq, GIST_LEAF(entry),
|
||||
PG_RETURN_FLOAT8(gbt_num_distance(&key, &qqq, GIST_LEAF(entry),
|
||||
&tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ gbt_ts_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(tsKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(tsKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ gbt_uuid_consistent(PG_FUNCTION_ARGS)
|
|||
key.lower = (GBT_NUMKEY *) &kkk->lower;
|
||||
key.upper = (GBT_NUMKEY *) &kkk->upper;
|
||||
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
|
||||
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
|
||||
GIST_LEAF(entry), &tinfo,
|
||||
fcinfo->flinfo));
|
||||
}
|
||||
|
|
@ -160,7 +160,7 @@ gbt_uuid_union(PG_FUNCTION_ARGS)
|
|||
void *out = palloc(sizeof(uuidKEY));
|
||||
|
||||
*(int *) PG_GETARG_POINTER(1) = sizeof(uuidKEY);
|
||||
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -531,7 +531,7 @@ fileGetForeignRelSize(PlannerInfo *root,
|
|||
&fdw_private->filename,
|
||||
&fdw_private->is_program,
|
||||
&fdw_private->options);
|
||||
baserel->fdw_private = (void *) fdw_private;
|
||||
baserel->fdw_private = fdw_private;
|
||||
|
||||
/* Estimate relation size */
|
||||
estimate_size(root, baserel, fdw_private);
|
||||
|
|
@ -713,7 +713,7 @@ fileBeginForeignScan(ForeignScanState *node, int eflags)
|
|||
festate->options = options;
|
||||
festate->cstate = cstate;
|
||||
|
||||
node->fdw_state = (void *) festate;
|
||||
node->fdw_state = festate;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -734,7 +734,7 @@ fileIterateForeignScan(ForeignScanState *node)
|
|||
|
||||
/* Set up callback to identify error line number. */
|
||||
errcallback.callback = CopyFromErrorCallback;
|
||||
errcallback.arg = (void *) cstate;
|
||||
errcallback.arg = cstate;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1228,7 +1228,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
|
|||
|
||||
/* Set up callback to identify error line number. */
|
||||
errcallback.callback = CopyFromErrorCallback;
|
||||
errcallback.arg = (void *) cstate;
|
||||
errcallback.arg = cstate;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
|
|||
|
|
@ -858,7 +858,7 @@ setup_firstcall(FuncCallContext *funcctx, HStore *hs,
|
|||
st = (HStore *) palloc(VARSIZE(hs));
|
||||
memcpy(st, hs, VARSIZE(hs));
|
||||
|
||||
funcctx->user_fctx = (void *) st;
|
||||
funcctx->user_fctx = st;
|
||||
|
||||
if (fcinfo)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ bool
|
|||
signconsistent(QUERYTYPE *query, BITVECP sign, int siglen, bool calcnot)
|
||||
{
|
||||
return execute(GETQUERY(query) + query->size - 1,
|
||||
(void *) sign, (void *) (intptr_t) siglen, calcnot,
|
||||
sign, (void *) (intptr_t) siglen, calcnot,
|
||||
checkcondition_bit);
|
||||
}
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ execconsistent(QUERYTYPE *query, ArrayType *array, bool calcnot)
|
|||
chkval.arrb = ARRPTR(array);
|
||||
chkval.arre = chkval.arrb + ARRNELEMS(array);
|
||||
return execute(GETQUERY(query) + query->size - 1,
|
||||
(void *) &chkval, NULL, calcnot,
|
||||
&chkval, NULL, calcnot,
|
||||
checkcondition_arr);
|
||||
}
|
||||
|
||||
|
|
@ -354,7 +354,7 @@ gin_bool_consistent(QUERYTYPE *query, bool *check)
|
|||
}
|
||||
|
||||
return execute(GETQUERY(query) + query->size - 1,
|
||||
(void *) &gcv, NULL, true,
|
||||
&gcv, NULL, true,
|
||||
checkcondition_gin);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -506,7 +506,7 @@ Datum
|
|||
_ltree_consistent(PG_FUNCTION_ARGS)
|
||||
{
|
||||
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
|
||||
void *query = (void *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
|
||||
void *query = PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
|
||||
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
|
||||
|
||||
/* Oid subtype = PG_GETARG_OID(3); */
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ _ltree_isparent(PG_FUNCTION_ARGS)
|
|||
{
|
||||
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
||||
ltree *query = PG_GETARG_LTREE_P(1);
|
||||
bool res = array_iterator(la, ltree_isparent, (void *) query, NULL);
|
||||
bool res = array_iterator(la, ltree_isparent, query, NULL);
|
||||
|
||||
PG_FREE_IF_COPY(la, 0);
|
||||
PG_FREE_IF_COPY(query, 1);
|
||||
|
|
@ -94,7 +94,7 @@ _ltree_risparent(PG_FUNCTION_ARGS)
|
|||
{
|
||||
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
||||
ltree *query = PG_GETARG_LTREE_P(1);
|
||||
bool res = array_iterator(la, ltree_risparent, (void *) query, NULL);
|
||||
bool res = array_iterator(la, ltree_risparent, query, NULL);
|
||||
|
||||
PG_FREE_IF_COPY(la, 0);
|
||||
PG_FREE_IF_COPY(query, 1);
|
||||
|
|
@ -115,7 +115,7 @@ _ltq_regex(PG_FUNCTION_ARGS)
|
|||
{
|
||||
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
||||
lquery *query = PG_GETARG_LQUERY_P(1);
|
||||
bool res = array_iterator(la, ltq_regex, (void *) query, NULL);
|
||||
bool res = array_iterator(la, ltq_regex, query, NULL);
|
||||
|
||||
PG_FREE_IF_COPY(la, 0);
|
||||
PG_FREE_IF_COPY(query, 1);
|
||||
|
|
@ -151,7 +151,7 @@ _lt_q_regex(PG_FUNCTION_ARGS)
|
|||
|
||||
while (num > 0)
|
||||
{
|
||||
if (array_iterator(_tree, ltq_regex, (void *) query, NULL))
|
||||
if (array_iterator(_tree, ltq_regex, query, NULL))
|
||||
{
|
||||
res = true;
|
||||
break;
|
||||
|
|
@ -180,7 +180,7 @@ _ltxtq_exec(PG_FUNCTION_ARGS)
|
|||
{
|
||||
ArrayType *la = PG_GETARG_ARRAYTYPE_P(0);
|
||||
ltxtquery *query = PG_GETARG_LTXTQUERY_P(1);
|
||||
bool res = array_iterator(la, ltxtq_exec, (void *) query, NULL);
|
||||
bool res = array_iterator(la, ltxtq_exec, query, NULL);
|
||||
|
||||
PG_FREE_IF_COPY(la, 0);
|
||||
PG_FREE_IF_COPY(query, 1);
|
||||
|
|
@ -205,7 +205,7 @@ _ltree_extract_isparent(PG_FUNCTION_ARGS)
|
|||
ltree *found,
|
||||
*item;
|
||||
|
||||
if (!array_iterator(la, ltree_isparent, (void *) query, &found))
|
||||
if (!array_iterator(la, ltree_isparent, query, &found))
|
||||
{
|
||||
PG_FREE_IF_COPY(la, 0);
|
||||
PG_FREE_IF_COPY(query, 1);
|
||||
|
|
@ -228,7 +228,7 @@ _ltree_extract_risparent(PG_FUNCTION_ARGS)
|
|||
ltree *found,
|
||||
*item;
|
||||
|
||||
if (!array_iterator(la, ltree_risparent, (void *) query, &found))
|
||||
if (!array_iterator(la, ltree_risparent, query, &found))
|
||||
{
|
||||
PG_FREE_IF_COPY(la, 0);
|
||||
PG_FREE_IF_COPY(query, 1);
|
||||
|
|
@ -251,7 +251,7 @@ _ltq_extract_regex(PG_FUNCTION_ARGS)
|
|||
ltree *found,
|
||||
*item;
|
||||
|
||||
if (!array_iterator(la, ltq_regex, (void *) query, &found))
|
||||
if (!array_iterator(la, ltq_regex, query, &found))
|
||||
{
|
||||
PG_FREE_IF_COPY(la, 0);
|
||||
PG_FREE_IF_COPY(query, 1);
|
||||
|
|
@ -274,7 +274,7 @@ _ltxtq_extract_exec(PG_FUNCTION_ARGS)
|
|||
ltree *found,
|
||||
*item;
|
||||
|
||||
if (!array_iterator(la, ltxtq_exec, (void *) query, &found))
|
||||
if (!array_iterator(la, ltxtq_exec, query, &found))
|
||||
{
|
||||
PG_FREE_IF_COPY(la, 0);
|
||||
PG_FREE_IF_COPY(query, 1);
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS)
|
|||
|
||||
if (cache)
|
||||
pfree(cache);
|
||||
fcinfo->flinfo->fn_extra = (void *) newcache;
|
||||
fcinfo->flinfo->fn_extra = newcache;
|
||||
cache = newcache;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ px_find_digest(const char *name, PX_MD **res)
|
|||
h->update = digest_update;
|
||||
h->finish = digest_finish;
|
||||
h->free = digest_free;
|
||||
h->p.ptr = (void *) digest;
|
||||
h->p.ptr = digest;
|
||||
|
||||
*res = h;
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -630,7 +630,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
|
|||
* functions.
|
||||
*/
|
||||
fpinfo = (PgFdwRelationInfo *) palloc0(sizeof(PgFdwRelationInfo));
|
||||
baserel->fdw_private = (void *) fpinfo;
|
||||
baserel->fdw_private = fpinfo;
|
||||
|
||||
/* Base foreign tables need to be pushed down always. */
|
||||
fpinfo->pushdown_safe = true;
|
||||
|
|
@ -1132,7 +1132,7 @@ postgresGetForeignPaths(PlannerInfo *root,
|
|||
clauses = generate_implied_equalities_for_column(root,
|
||||
baserel,
|
||||
ec_member_matches_foreign,
|
||||
(void *) &arg,
|
||||
&arg,
|
||||
baserel->lateral_referencers);
|
||||
|
||||
/* Done if there are no more expressions in the foreign rel */
|
||||
|
|
@ -1514,7 +1514,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
|
|||
* We'll save private state in node->fdw_state.
|
||||
*/
|
||||
fsstate = (PgFdwScanState *) palloc0(sizeof(PgFdwScanState));
|
||||
node->fdw_state = (void *) fsstate;
|
||||
node->fdw_state = fsstate;
|
||||
|
||||
/*
|
||||
* Identify which user to do the remote access as. This should match what
|
||||
|
|
@ -2664,7 +2664,7 @@ postgresBeginDirectModify(ForeignScanState *node, int eflags)
|
|||
* We'll save private state in node->fdw_state.
|
||||
*/
|
||||
dmstate = (PgFdwDirectModifyState *) palloc0(sizeof(PgFdwDirectModifyState));
|
||||
node->fdw_state = (void *) dmstate;
|
||||
node->fdw_state = dmstate;
|
||||
|
||||
/*
|
||||
* Identify which user to do the remote access as. This should match what
|
||||
|
|
@ -7618,7 +7618,7 @@ make_tuple_from_result_row(PGresult *res,
|
|||
errpos.rel = rel;
|
||||
errpos.fsstate = fsstate;
|
||||
errcallback.callback = conversion_error_callback;
|
||||
errcallback.arg = (void *) &errpos;
|
||||
errcallback.arg = &errpos;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
|
|||
|
|
@ -1222,7 +1222,7 @@ brinbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
|||
* generate summary for the same range twice).
|
||||
*/
|
||||
reltuples = table_index_build_scan(heap, index, indexInfo, false, true,
|
||||
brinbuildCallback, (void *) state, NULL);
|
||||
brinbuildCallback, state, NULL);
|
||||
|
||||
/*
|
||||
* process the final batch
|
||||
|
|
@ -1808,7 +1808,7 @@ summarize_range(IndexInfo *indexInfo, BrinBuildState *state, Relation heapRel,
|
|||
state->bs_currRangeStart = heapBlk;
|
||||
table_index_build_range_scan(heapRel, state->bs_irel, indexInfo, false, true, false,
|
||||
heapBlk, scanNumBlks,
|
||||
brinbuildCallback, (void *) state, NULL);
|
||||
brinbuildCallback, state, NULL);
|
||||
|
||||
/*
|
||||
* Now we update the values obtained by the scan with the placeholder
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ AssertCheckRanges(Ranges *ranges, FmgrInfo *cmpFn, Oid colloid)
|
|||
|
||||
Assert(bsearch_arg(&value, &ranges->values[2 * ranges->nranges],
|
||||
ranges->nsorted, sizeof(Datum),
|
||||
compare_values, (void *) &cxt) == NULL);
|
||||
compare_values, &cxt) == NULL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -550,7 +550,7 @@ range_deduplicate_values(Ranges *range)
|
|||
/* same as preceding value, so store it */
|
||||
if (compare_values(&range->values[start + i - 1],
|
||||
&range->values[start + i],
|
||||
(void *) &cxt) == 0)
|
||||
&cxt) == 0)
|
||||
continue;
|
||||
|
||||
range->values[start + n] = range->values[start + i];
|
||||
|
|
@ -1085,7 +1085,7 @@ range_contains_value(BrinDesc *bdesc, Oid colloid,
|
|||
|
||||
if (bsearch_arg(&newval, &ranges->values[2 * ranges->nranges],
|
||||
ranges->nsorted, sizeof(Datum),
|
||||
compare_values, (void *) &cxt) != NULL)
|
||||
compare_values, &cxt) != NULL)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
|
@ -1206,7 +1206,7 @@ sort_expanded_ranges(FmgrInfo *cmp, Oid colloid,
|
|||
for (i = 1; i < neranges; i++)
|
||||
{
|
||||
/* if the current range is equal to the preceding one, do nothing */
|
||||
if (!compare_expanded_ranges(&eranges[i - 1], &eranges[i], (void *) &cxt))
|
||||
if (!compare_expanded_ranges(&eranges[i - 1], &eranges[i], &cxt))
|
||||
continue;
|
||||
|
||||
/* otherwise, copy it to n-th place (if not already there) */
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ detoast_external_attr(struct varlena *attr)
|
|||
eoh = DatumGetEOHP(PointerGetDatum(attr));
|
||||
resultsize = EOH_get_flat_size(eoh);
|
||||
result = (struct varlena *) palloc(resultsize);
|
||||
EOH_flatten_into(eoh, (void *) result, resultsize);
|
||||
EOH_flatten_into(eoh, result, resultsize);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ ginInitBA(BuildAccumulator *accum)
|
|||
ginCombineData,
|
||||
ginAllocEntryAccumulator,
|
||||
NULL, /* no freefunc needed */
|
||||
(void *) accum);
|
||||
accum);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -380,8 +380,7 @@ ginbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
|||
* prefers to receive tuples in TID order.
|
||||
*/
|
||||
reltuples = table_index_build_scan(heap, index, indexInfo, false, true,
|
||||
ginBuildCallback, (void *) &buildstate,
|
||||
NULL);
|
||||
ginBuildCallback, &buildstate, NULL);
|
||||
|
||||
/* dump remaining entries to the index */
|
||||
oldCtx = MemoryContextSwitchTo(buildstate.tmpCtx);
|
||||
|
|
@ -497,7 +496,7 @@ gininsert(Relation index, Datum *values, bool *isnull,
|
|||
oldCtx = MemoryContextSwitchTo(indexInfo->ii_Context);
|
||||
ginstate = (GinState *) palloc(sizeof(GinState));
|
||||
initGinState(ginstate, index);
|
||||
indexInfo->ii_AmCache = (void *) ginstate;
|
||||
indexInfo->ii_AmCache = ginstate;
|
||||
MemoryContextSwitchTo(oldCtx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ gistinsert(Relation r, Datum *values, bool *isnull,
|
|||
oldCxt = MemoryContextSwitchTo(indexInfo->ii_Context);
|
||||
giststate = initGISTstate(r);
|
||||
giststate->tempCxt = createTempGistContext();
|
||||
indexInfo->ii_AmCache = (void *) giststate;
|
||||
indexInfo->ii_AmCache = giststate;
|
||||
MemoryContextSwitchTo(oldCxt);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ gistbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
|||
/* Scan the table, adding all tuples to the tuplesort */
|
||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||
gistSortedBuildCallback,
|
||||
(void *) &buildstate, NULL);
|
||||
&buildstate, NULL);
|
||||
|
||||
/*
|
||||
* Perform the sort and build index pages.
|
||||
|
|
@ -312,7 +312,7 @@ gistbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
|||
/* Scan the table, inserting all the tuples to the index. */
|
||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||
gistBuildCallback,
|
||||
(void *) &buildstate, NULL);
|
||||
&buildstate, NULL);
|
||||
|
||||
/*
|
||||
* If buffering was used, flush out all the tuples that are still in
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
|||
/* do the heap scan */
|
||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||
hashbuildCallback,
|
||||
(void *) &buildstate, NULL);
|
||||
&buildstate, NULL);
|
||||
pgstat_progress_update_param(PROGRESS_CREATEIDX_TUPLES_TOTAL,
|
||||
buildstate.indtuples);
|
||||
|
||||
|
|
|
|||
|
|
@ -2453,7 +2453,7 @@ lazy_vacuum_one_index(Relation indrel, IndexBulkDeleteResult *istat,
|
|||
InvalidBlockNumber, InvalidOffsetNumber);
|
||||
|
||||
/* Do bulk deletion */
|
||||
istat = vac_bulkdel_one_index(&ivinfo, istat, (void *) vacrel->dead_items,
|
||||
istat = vac_bulkdel_one_index(&ivinfo, istat, vacrel->dead_items,
|
||||
vacrel->dead_items_info);
|
||||
|
||||
/* Revert to the previous phase information for error traceback */
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ btparallelrescan(IndexScanDesc scan)
|
|||
|
||||
Assert(parallel_scan);
|
||||
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||
parallel_scan->ps_offset);
|
||||
|
||||
/*
|
||||
|
|
@ -644,7 +644,7 @@ _bt_parallel_seize(IndexScanDesc scan, BlockNumber *next_scan_page,
|
|||
return false;
|
||||
}
|
||||
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||
parallel_scan->ps_offset);
|
||||
|
||||
while (1)
|
||||
|
|
@ -752,7 +752,7 @@ _bt_parallel_release(IndexScanDesc scan, BlockNumber next_scan_page,
|
|||
|
||||
Assert(BlockNumberIsValid(next_scan_page));
|
||||
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||
parallel_scan->ps_offset);
|
||||
|
||||
SpinLockAcquire(&btscan->btps_mutex);
|
||||
|
|
@ -791,7 +791,7 @@ _bt_parallel_done(IndexScanDesc scan)
|
|||
if (so->needPrimScan)
|
||||
return;
|
||||
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||
parallel_scan->ps_offset);
|
||||
|
||||
/*
|
||||
|
|
@ -829,7 +829,7 @@ _bt_parallel_primscan_schedule(IndexScanDesc scan, BlockNumber curr_page)
|
|||
|
||||
Assert(so->numArrayKeys);
|
||||
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
|
||||
btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
|
||||
parallel_scan->ps_offset);
|
||||
|
||||
SpinLockAcquire(&btscan->btps_mutex);
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ _bt_spools_heapscan(Relation heap, Relation index, BTBuildState *buildstate,
|
|||
/* Fill spool using either serial or parallel heap scan */
|
||||
if (!buildstate->btleader)
|
||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||
_bt_build_callback, (void *) buildstate,
|
||||
_bt_build_callback, buildstate,
|
||||
NULL);
|
||||
else
|
||||
reltuples = _bt_parallel_heapscan(buildstate,
|
||||
|
|
@ -1930,7 +1930,7 @@ _bt_parallel_scan_and_sort(BTSpool *btspool, BTSpool *btspool2,
|
|||
ParallelTableScanFromBTShared(btshared));
|
||||
reltuples = table_index_build_scan(btspool->heap, btspool->index, indexInfo,
|
||||
true, progress, _bt_build_callback,
|
||||
(void *) &buildstate, scan);
|
||||
&buildstate, scan);
|
||||
|
||||
/* Execute this worker's part of the sort */
|
||||
if (progress)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ spgbuild(Relation heap, Relation index, IndexInfo *indexInfo)
|
|||
ALLOCSET_DEFAULT_SIZES);
|
||||
|
||||
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
|
||||
spgistBuildCallback, (void *) &buildstate,
|
||||
spgistBuildCallback, &buildstate,
|
||||
NULL);
|
||||
|
||||
MemoryContextDelete(buildstate.tmpCtx);
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ spgGetCache(Relation index)
|
|||
UnlockReleaseBuffer(metabuffer);
|
||||
}
|
||||
|
||||
index->rd_amcache = (void *) cache;
|
||||
index->rd_amcache = cache;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -747,7 +747,7 @@ pg_prepared_xact(PG_FUNCTION_ARGS)
|
|||
* out as a result set.
|
||||
*/
|
||||
status = (Working_State *) palloc(sizeof(Working_State));
|
||||
funcctx->user_fctx = (void *) status;
|
||||
funcctx->user_fctx = status;
|
||||
|
||||
status->ngxacts = GetPreparedTransactionList(&status->array);
|
||||
status->currIdx = 0;
|
||||
|
|
@ -1707,8 +1707,7 @@ ProcessRecords(char *bufptr, TransactionId xid,
|
|||
bufptr += MAXALIGN(sizeof(TwoPhaseRecordOnDisk));
|
||||
|
||||
if (callbacks[record->rmid] != NULL)
|
||||
callbacks[record->rmid] (xid, record->info,
|
||||
(void *) bufptr, record->len);
|
||||
callbacks[record->rmid] (xid, record->info, bufptr, record->len);
|
||||
|
||||
bufptr += MAXALIGN(record->len);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1913,7 +1913,7 @@ ApplyWalRecord(XLogReaderState *xlogreader, XLogRecord *record, TimeLineID *repl
|
|||
|
||||
/* Setup error traceback support for ereport() */
|
||||
errcallback.callback = rm_redo_error_callback;
|
||||
errcallback.arg = (void *) xlogreader;
|
||||
errcallback.arg = xlogreader;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -4821,7 +4821,7 @@ check_recovery_target_lsn(char **newval, void **extra, GucSource source)
|
|||
|
||||
myextra = (XLogRecPtr *) guc_malloc(ERROR, sizeof(XLogRecPtr));
|
||||
*myextra = lsn;
|
||||
*extra = (void *) myextra;
|
||||
*extra = myextra;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -4985,7 +4985,7 @@ check_recovery_target_timeline(char **newval, void **extra, GucSource source)
|
|||
|
||||
myextra = (RecoveryTargetTimeLineGoal *) guc_malloc(ERROR, sizeof(RecoveryTargetTimeLineGoal));
|
||||
*myextra = rttg;
|
||||
*extra = (void *) myextra;
|
||||
*extra = myextra;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -5021,7 +5021,7 @@ check_recovery_target_xid(char **newval, void **extra, GucSource source)
|
|||
|
||||
myextra = (TransactionId *) guc_malloc(ERROR, sizeof(TransactionId));
|
||||
*myextra = xid;
|
||||
*extra = (void *) myextra;
|
||||
*extra = myextra;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2240,7 +2240,7 @@ find_expr_references_walker(Node *node,
|
|||
context->rtables = lcons(query->rtable, context->rtables);
|
||||
result = query_tree_walker(query,
|
||||
find_expr_references_walker,
|
||||
(void *) context,
|
||||
context,
|
||||
QTW_IGNORE_JOINALIASES |
|
||||
QTW_EXAMINE_SORTGROUP);
|
||||
context->rtables = list_delete_first(context->rtables);
|
||||
|
|
@ -2310,7 +2310,7 @@ find_expr_references_walker(Node *node,
|
|||
}
|
||||
|
||||
return expression_tree_walker(node, find_expr_references_walker,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -3118,7 +3118,7 @@ check_nested_generated_walker(Node *node, void *context)
|
|||
}
|
||||
else
|
||||
return expression_tree_walker(node, check_nested_generated_walker,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -3395,7 +3395,7 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot)
|
|||
|
||||
/* ambulkdelete updates progress metrics */
|
||||
(void) index_bulk_delete(&ivinfo, NULL,
|
||||
validate_index_callback, (void *) &state);
|
||||
validate_index_callback, &state);
|
||||
|
||||
/* Execute the sort */
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ RunObjectPostCreateHook(Oid classId, Oid objectId, int subId,
|
|||
|
||||
(*object_access_hook) (OAT_POST_CREATE,
|
||||
classId, objectId, subId,
|
||||
(void *) &pc_arg);
|
||||
&pc_arg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -64,7 +64,7 @@ RunObjectDropHook(Oid classId, Oid objectId, int subId,
|
|||
|
||||
(*object_access_hook) (OAT_DROP,
|
||||
classId, objectId, subId,
|
||||
(void *) &drop_arg);
|
||||
&drop_arg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -103,7 +103,7 @@ RunObjectPostAlterHook(Oid classId, Oid objectId, int subId,
|
|||
|
||||
(*object_access_hook) (OAT_POST_ALTER,
|
||||
classId, objectId, subId,
|
||||
(void *) &pa_arg);
|
||||
&pa_arg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -125,7 +125,7 @@ RunNamespaceSearchHook(Oid objectId, bool ereport_on_violation)
|
|||
|
||||
(*object_access_hook) (OAT_NAMESPACE_SEARCH,
|
||||
NamespaceRelationId, objectId, 0,
|
||||
(void *) &ns_arg);
|
||||
&ns_arg);
|
||||
|
||||
return ns_arg.result;
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ RunObjectPostCreateHookStr(Oid classId, const char *objectName, int subId,
|
|||
|
||||
(*object_access_hook_str) (OAT_POST_CREATE,
|
||||
classId, objectName, subId,
|
||||
(void *) &pc_arg);
|
||||
&pc_arg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -190,7 +190,7 @@ RunObjectDropHookStr(Oid classId, const char *objectName, int subId,
|
|||
|
||||
(*object_access_hook_str) (OAT_DROP,
|
||||
classId, objectName, subId,
|
||||
(void *) &drop_arg);
|
||||
&drop_arg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -229,7 +229,7 @@ RunObjectPostAlterHookStr(Oid classId, const char *objectName, int subId,
|
|||
|
||||
(*object_access_hook_str) (OAT_POST_ALTER,
|
||||
classId, objectName, subId,
|
||||
(void *) &pa_arg);
|
||||
&pa_arg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -251,7 +251,7 @@ RunNamespaceSearchHookStr(const char *objectName, bool ereport_on_violation)
|
|||
|
||||
(*object_access_hook_str) (OAT_NAMESPACE_SEARCH,
|
||||
NamespaceRelationId, objectName, 0,
|
||||
(void *) &ns_arg);
|
||||
&ns_arg);
|
||||
|
||||
return ns_arg.result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -873,7 +873,7 @@ fmgr_sql_validator(PG_FUNCTION_ARGS)
|
|||
callback_arg.prosrc = prosrc;
|
||||
|
||||
sqlerrcontext.callback = sql_function_parse_error_callback;
|
||||
sqlerrcontext.arg = (void *) &callback_arg;
|
||||
sqlerrcontext.arg = &callback_arg;
|
||||
sqlerrcontext.previous = error_context_stack;
|
||||
error_context_stack = &sqlerrcontext;
|
||||
|
||||
|
|
|
|||
|
|
@ -1202,7 +1202,7 @@ pg_get_publication_tables(PG_FUNCTION_ARGS)
|
|||
PG_NODE_TREEOID, -1, 0);
|
||||
|
||||
funcctx->tuple_desc = BlessTupleDesc(tupdesc);
|
||||
funcctx->user_fctx = (void *) table_infos;
|
||||
funcctx->user_fctx = table_infos;
|
||||
|
||||
MemoryContextSwitchTo(oldcontext);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -959,7 +959,7 @@ CopyFrom(CopyFromState cstate)
|
|||
|
||||
/* Set up callback to identify error line number */
|
||||
errcallback.callback = CopyFromErrorCallback;
|
||||
errcallback.arg = (void *) cstate;
|
||||
errcallback.arg = cstate;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
|
|||
|
|
@ -1532,7 +1532,7 @@ ImportForeignSchema(ImportForeignSchemaStmt *stmt)
|
|||
callback_arg.tablename = NULL; /* not known yet */
|
||||
callback_arg.cmd = cmd;
|
||||
sqlerrcontext.callback = import_error_callback;
|
||||
sqlerrcontext.arg = (void *) &callback_arg;
|
||||
sqlerrcontext.arg = &callback_arg;
|
||||
sqlerrcontext.previous = error_context_stack;
|
||||
error_context_stack = &sqlerrcontext;
|
||||
|
||||
|
|
|
|||
|
|
@ -3344,7 +3344,7 @@ ReindexPartitions(const ReindexStmt *stmt, Oid relid, const ReindexParams *param
|
|||
errinfo.relnamespace = pstrdup(relnamespace);
|
||||
errinfo.relkind = relkind;
|
||||
errcallback.callback = reindex_error_callback;
|
||||
errcallback.arg = (void *) &errinfo;
|
||||
errcallback.arg = &errinfo;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ LockTableCommand(LockStmt *lockstmt)
|
|||
reloid = RangeVarGetRelidExtended(rv, lockstmt->mode,
|
||||
lockstmt->nowait ? RVR_NOWAIT : 0,
|
||||
RangeVarCallbackForLockTable,
|
||||
(void *) &lockstmt->mode);
|
||||
&lockstmt->mode);
|
||||
|
||||
if (get_rel_relkind(reloid) == RELKIND_VIEW)
|
||||
LockViewRecurse(reloid, lockstmt->mode, lockstmt->nowait, NIL);
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ CreatePolicy(CreatePolicyStmt *stmt)
|
|||
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
|
||||
0,
|
||||
RangeVarCallbackForPolicy,
|
||||
(void *) stmt);
|
||||
stmt);
|
||||
|
||||
/* Open target_table to build quals. No additional lock is necessary. */
|
||||
target_table = relation_open(table_id, NoLock);
|
||||
|
|
@ -803,7 +803,7 @@ AlterPolicy(AlterPolicyStmt *stmt)
|
|||
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
|
||||
0,
|
||||
RangeVarCallbackForPolicy,
|
||||
(void *) stmt);
|
||||
stmt);
|
||||
|
||||
target_table = relation_open(table_id, NoLock);
|
||||
|
||||
|
|
@ -1108,7 +1108,7 @@ rename_policy(RenameStmt *stmt)
|
|||
table_id = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
|
||||
0,
|
||||
RangeVarCallbackForPolicy,
|
||||
(void *) stmt);
|
||||
stmt);
|
||||
|
||||
target_table = relation_open(table_id, NoLock);
|
||||
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ contain_invalid_rfcolumn_walker(Node *node, rf_context *context)
|
|||
}
|
||||
|
||||
return expression_tree_walker(node, contain_invalid_rfcolumn_walker,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -570,7 +570,7 @@ check_simple_rowfilter_expr_walker(Node *node, ParseState *pstate)
|
|||
if (exprType(node) >= FirstNormalObjectId)
|
||||
errdetail_msg = _("User-defined types are not allowed.");
|
||||
else if (check_functions_in_node(node, contain_mutable_or_user_functions_checker,
|
||||
(void *) pstate))
|
||||
pstate))
|
||||
errdetail_msg = _("User-defined or built-in mutable functions are not allowed.");
|
||||
else if (exprCollation(node) >= FirstNormalObjectId ||
|
||||
exprInputCollation(node) >= FirstNormalObjectId)
|
||||
|
|
@ -589,7 +589,7 @@ check_simple_rowfilter_expr_walker(Node *node, ParseState *pstate)
|
|||
parser_errposition(pstate, exprLocation(node))));
|
||||
|
||||
return expression_tree_walker(node, check_simple_rowfilter_expr_walker,
|
||||
(void *) pstate);
|
||||
pstate);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1581,7 +1581,7 @@ RemoveRelations(DropStmt *drop)
|
|||
|
||||
relOid = RangeVarGetRelidExtended(rel, lockmode, RVR_MISSING_OK,
|
||||
RangeVarCallbackForDropRelation,
|
||||
(void *) &state);
|
||||
&state);
|
||||
|
||||
/* Not there? */
|
||||
if (!OidIsValid(relOid))
|
||||
|
|
@ -4142,7 +4142,7 @@ RenameRelation(RenameStmt *stmt)
|
|||
relid = RangeVarGetRelidExtended(stmt->relation, lockmode,
|
||||
stmt->missing_ok ? RVR_MISSING_OK : 0,
|
||||
RangeVarCallbackForAlterRelation,
|
||||
(void *) stmt);
|
||||
stmt);
|
||||
|
||||
if (!OidIsValid(relid))
|
||||
{
|
||||
|
|
@ -4390,7 +4390,7 @@ AlterTableLookupRelation(AlterTableStmt *stmt, LOCKMODE lockmode)
|
|||
return RangeVarGetRelidExtended(stmt->relation, lockmode,
|
||||
stmt->missing_ok ? RVR_MISSING_OK : 0,
|
||||
RangeVarCallbackForAlterRelation,
|
||||
(void *) stmt);
|
||||
stmt);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -17719,7 +17719,7 @@ AlterTableNamespace(AlterObjectSchemaStmt *stmt, Oid *oldschema)
|
|||
relid = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
|
||||
stmt->missing_ok ? RVR_MISSING_OK : 0,
|
||||
RangeVarCallbackForAlterRelation,
|
||||
(void *) stmt);
|
||||
stmt);
|
||||
|
||||
if (!OidIsValid(relid))
|
||||
{
|
||||
|
|
@ -20350,7 +20350,7 @@ ATExecAttachPartitionIdx(List **wqueue, Relation parentIdx, RangeVar *name)
|
|||
partIdxId =
|
||||
RangeVarGetRelidExtended(name, AccessExclusiveLock, 0,
|
||||
RangeVarCallbackForAttachIndex,
|
||||
(void *) &state);
|
||||
&state);
|
||||
/* Not there? */
|
||||
if (!OidIsValid(partIdxId))
|
||||
ereport(ERROR,
|
||||
|
|
|
|||
|
|
@ -1290,7 +1290,7 @@ check_temp_tablespaces(char **newval, void **extra, GucSource source)
|
|||
return false;
|
||||
myextra->numSpcs = numSpcs;
|
||||
memcpy(myextra->tblSpcs, tblSpcs, numSpcs * sizeof(Oid));
|
||||
*extra = (void *) myextra;
|
||||
*extra = myextra;
|
||||
|
||||
pfree(tblSpcs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3562,7 +3562,7 @@ domainAddCheckConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid,
|
|||
domVal->location = -1; /* will be set when/if used */
|
||||
|
||||
pstate->p_pre_columnref_hook = replace_domain_constraint_value;
|
||||
pstate->p_ref_hook_state = (void *) domVal;
|
||||
pstate->p_ref_hook_state = domVal;
|
||||
|
||||
expr = transformExpr(pstate, constr->raw_expr, EXPR_KIND_DOMAIN_CHECK);
|
||||
|
||||
|
|
|
|||
|
|
@ -2518,7 +2518,7 @@ vac_bulkdel_one_index(IndexVacuumInfo *ivinfo, IndexBulkDeleteResult *istat,
|
|||
{
|
||||
/* Do bulk deletion */
|
||||
istat = index_bulk_delete(ivinfo, istat, vac_tid_reaped,
|
||||
(void *) dead_items);
|
||||
dead_items);
|
||||
|
||||
ereport(ivinfo->message_level,
|
||||
(errmsg("scanned index \"%s\" to remove %lld row versions",
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ check_datestyle(char **newval, void **extra, GucSource source)
|
|||
return false;
|
||||
myextra[0] = newDateStyle;
|
||||
myextra[1] = newDateOrder;
|
||||
*extra = (void *) myextra;
|
||||
*extra = myextra;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -901,7 +901,7 @@ check_session_authorization(char **newval, void **extra, GucSource source)
|
|||
return false;
|
||||
myextra->roleid = roleid;
|
||||
myextra->is_superuser = is_superuser;
|
||||
*extra = (void *) myextra;
|
||||
*extra = myextra;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1015,7 +1015,7 @@ check_role(char **newval, void **extra, GucSource source)
|
|||
return false;
|
||||
myextra->roleid = roleid;
|
||||
myextra->is_superuser = is_superuser;
|
||||
*extra = (void *) myextra;
|
||||
*extra = myextra;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2916,8 +2916,7 @@ expr_setup_walker(Node *node, ExprSetupInfo *info)
|
|||
return false;
|
||||
if (IsA(node, GroupingFunc))
|
||||
return false;
|
||||
return expression_tree_walker(node, expr_setup_walker,
|
||||
(void *) info);
|
||||
return expression_tree_walker(node, expr_setup_walker, info);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -281,44 +281,44 @@ ExecReadyInterpretedExpr(ExprState *state)
|
|||
if (step0 == EEOP_INNER_FETCHSOME &&
|
||||
step1 == EEOP_INNER_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustInnerVar;
|
||||
state->evalfunc_private = ExecJustInnerVar;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_OUTER_FETCHSOME &&
|
||||
step1 == EEOP_OUTER_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustOuterVar;
|
||||
state->evalfunc_private = ExecJustOuterVar;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_SCAN_FETCHSOME &&
|
||||
step1 == EEOP_SCAN_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustScanVar;
|
||||
state->evalfunc_private = ExecJustScanVar;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_INNER_FETCHSOME &&
|
||||
step1 == EEOP_ASSIGN_INNER_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustAssignInnerVar;
|
||||
state->evalfunc_private = ExecJustAssignInnerVar;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_OUTER_FETCHSOME &&
|
||||
step1 == EEOP_ASSIGN_OUTER_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustAssignOuterVar;
|
||||
state->evalfunc_private = ExecJustAssignOuterVar;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_SCAN_FETCHSOME &&
|
||||
step1 == EEOP_ASSIGN_SCAN_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustAssignScanVar;
|
||||
state->evalfunc_private = ExecJustAssignScanVar;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_CASE_TESTVAL &&
|
||||
step1 == EEOP_FUNCEXPR_STRICT &&
|
||||
state->steps[0].d.casetest.value)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustApplyFuncToCase;
|
||||
state->evalfunc_private = ExecJustApplyFuncToCase;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -328,37 +328,37 @@ ExecReadyInterpretedExpr(ExprState *state)
|
|||
|
||||
if (step0 == EEOP_CONST)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustConst;
|
||||
state->evalfunc_private = ExecJustConst;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_INNER_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustInnerVarVirt;
|
||||
state->evalfunc_private = ExecJustInnerVarVirt;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_OUTER_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustOuterVarVirt;
|
||||
state->evalfunc_private = ExecJustOuterVarVirt;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_SCAN_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustScanVarVirt;
|
||||
state->evalfunc_private = ExecJustScanVarVirt;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_ASSIGN_INNER_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustAssignInnerVarVirt;
|
||||
state->evalfunc_private = ExecJustAssignInnerVarVirt;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_ASSIGN_OUTER_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustAssignOuterVarVirt;
|
||||
state->evalfunc_private = ExecJustAssignOuterVarVirt;
|
||||
return;
|
||||
}
|
||||
else if (step0 == EEOP_ASSIGN_SCAN_VAR)
|
||||
{
|
||||
state->evalfunc_private = (void *) ExecJustAssignScanVarVirt;
|
||||
state->evalfunc_private = ExecJustAssignScanVarVirt;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -379,7 +379,7 @@ ExecReadyInterpretedExpr(ExprState *state)
|
|||
state->flags |= EEO_FLAG_DIRECT_THREADED;
|
||||
#endif /* EEO_USE_COMPUTED_GOTO */
|
||||
|
||||
state->evalfunc_private = (void *) ExecInterpExpr;
|
||||
state->evalfunc_private = ExecInterpExpr;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2226,7 +2226,7 @@ get_cached_rowtype(Oid type_id, int32 typmod,
|
|||
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||
errmsg("type %s is not composite",
|
||||
format_type_be(type_id))));
|
||||
rowcache->cacheptr = (void *) typentry;
|
||||
rowcache->cacheptr = typentry;
|
||||
rowcache->tupdesc_id = typentry->tupDesc_identifier;
|
||||
if (changed)
|
||||
*changed = true;
|
||||
|
|
@ -2251,7 +2251,7 @@ get_cached_rowtype(Oid type_id, int32 typmod,
|
|||
tupDesc = lookup_rowtype_tupdesc(type_id, typmod);
|
||||
/* Drop pin acquired by lookup_rowtype_tupdesc */
|
||||
ReleaseTupleDesc(tupDesc);
|
||||
rowcache->cacheptr = (void *) tupDesc;
|
||||
rowcache->cacheptr = tupDesc;
|
||||
rowcache->tupdesc_id = 0; /* not a valid value for non-RECORD */
|
||||
if (changed)
|
||||
*changed = true;
|
||||
|
|
|
|||
|
|
@ -1130,7 +1130,7 @@ index_expression_changed_walker(Node *node, Bitmapset *allUpdatedCols)
|
|||
}
|
||||
|
||||
return expression_tree_walker(node, index_expression_changed_walker,
|
||||
(void *) allUpdatedCols);
|
||||
allUpdatedCols);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ sql_fn_parser_setup(struct ParseState *pstate, SQLFunctionParseInfoPtr pinfo)
|
|||
pstate->p_post_columnref_hook = sql_fn_post_column_ref;
|
||||
pstate->p_paramref_hook = sql_fn_param_ref;
|
||||
/* no need to use p_coerce_param_hook */
|
||||
pstate->p_ref_hook_state = (void *) pinfo;
|
||||
pstate->p_ref_hook_state = pinfo;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -614,7 +614,7 @@ init_sql_fcache(FunctionCallInfo fcinfo, Oid collation, bool lazyEvalOK)
|
|||
*/
|
||||
fcache = (SQLFunctionCachePtr) palloc0(sizeof(SQLFunctionCache));
|
||||
fcache->fcontext = fcontext;
|
||||
finfo->fn_extra = (void *) fcache;
|
||||
finfo->fn_extra = fcache;
|
||||
|
||||
/*
|
||||
* get the procedure tuple corresponding to the given function Oid
|
||||
|
|
|
|||
|
|
@ -1088,7 +1088,7 @@ finalize_aggregate(AggState *aggstate,
|
|||
InitFunctionCallInfoData(*fcinfo, &peragg->finalfn,
|
||||
numFinalArgs,
|
||||
pertrans->aggCollation,
|
||||
(void *) aggstate, NULL);
|
||||
(Node *) aggstate, NULL);
|
||||
|
||||
/* Fill in the transition state value */
|
||||
fcinfo->args[0].value =
|
||||
|
|
@ -1440,12 +1440,11 @@ find_cols_walker(Node *node, FindColsContext *context)
|
|||
{
|
||||
Assert(!context->is_aggref);
|
||||
context->is_aggref = true;
|
||||
expression_tree_walker(node, find_cols_walker, (void *) context);
|
||||
expression_tree_walker(node, find_cols_walker, context);
|
||||
context->is_aggref = false;
|
||||
return false;
|
||||
}
|
||||
return expression_tree_walker(node, find_cols_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, find_cols_walker, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -4101,7 +4100,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
|
|||
&pertrans->transfn,
|
||||
numTransArgs,
|
||||
pertrans->aggCollation,
|
||||
(void *) aggstate, NULL);
|
||||
(Node *) aggstate, NULL);
|
||||
|
||||
/* get info about the state value's datatype */
|
||||
get_typlenbyval(aggtranstype,
|
||||
|
|
@ -4121,7 +4120,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
|
|||
&pertrans->serialfn,
|
||||
1,
|
||||
InvalidOid,
|
||||
(void *) aggstate, NULL);
|
||||
(Node *) aggstate, NULL);
|
||||
}
|
||||
|
||||
if (OidIsValid(aggdeserialfn))
|
||||
|
|
@ -4137,7 +4136,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
|
|||
&pertrans->deserialfn,
|
||||
2,
|
||||
InvalidOid,
|
||||
(void *) aggstate, NULL);
|
||||
(Node *) aggstate, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ ExecSort(PlanState *pstate)
|
|||
tuplesortopts);
|
||||
if (node->bounded)
|
||||
tuplesort_set_bound(tuplesortstate, node->bound);
|
||||
node->tuplesortstate = (void *) tuplesortstate;
|
||||
node->tuplesortstate = tuplesortstate;
|
||||
|
||||
/*
|
||||
* Scan the subplan and feed all the tuples to tuplesort using the
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ advance_windowaggregate(WindowAggState *winstate,
|
|||
InitFunctionCallInfoData(*fcinfo, &(peraggstate->transfn),
|
||||
numArguments + 1,
|
||||
perfuncstate->winCollation,
|
||||
(void *) winstate, NULL);
|
||||
(Node *) winstate, NULL);
|
||||
fcinfo->args[0].value = peraggstate->transValue;
|
||||
fcinfo->args[0].isnull = peraggstate->transValueIsNull;
|
||||
winstate->curaggcontext = peraggstate->aggcontext;
|
||||
|
|
@ -510,7 +510,7 @@ advance_windowaggregate_base(WindowAggState *winstate,
|
|||
InitFunctionCallInfoData(*fcinfo, &(peraggstate->invtransfn),
|
||||
numArguments + 1,
|
||||
perfuncstate->winCollation,
|
||||
(void *) winstate, NULL);
|
||||
(Node *) winstate, NULL);
|
||||
fcinfo->args[0].value = peraggstate->transValue;
|
||||
fcinfo->args[0].isnull = peraggstate->transValueIsNull;
|
||||
winstate->curaggcontext = peraggstate->aggcontext;
|
||||
|
|
@ -601,7 +601,7 @@ finalize_windowaggregate(WindowAggState *winstate,
|
|||
InitFunctionCallInfoData(fcinfodata.fcinfo, &(peraggstate->finalfn),
|
||||
numFinalArgs,
|
||||
perfuncstate->winCollation,
|
||||
(void *) winstate, NULL);
|
||||
(Node *) winstate, NULL);
|
||||
fcinfo->args[0].value =
|
||||
MakeExpandedObjectReadOnly(peraggstate->transValue,
|
||||
peraggstate->transValueIsNull,
|
||||
|
|
@ -1047,7 +1047,7 @@ eval_windowfunction(WindowAggState *winstate, WindowStatePerFunc perfuncstate,
|
|||
InitFunctionCallInfoData(*fcinfo, &(perfuncstate->flinfo),
|
||||
perfuncstate->numArguments,
|
||||
perfuncstate->winCollation,
|
||||
(void *) perfuncstate->winobj, NULL);
|
||||
(Node *) perfuncstate->winobj, NULL);
|
||||
/* Just in case, make all the regular argument slots be null */
|
||||
for (int argno = 0; argno < perfuncstate->numArguments; argno++)
|
||||
fcinfo->args[argno].isnull = true;
|
||||
|
|
|
|||
|
|
@ -702,7 +702,7 @@ tokenize_auth_file(const char *filename, FILE *file, List **tok_lines,
|
|||
callback_arg.linenum = line_number;
|
||||
|
||||
tokenerrcontext.callback = tokenize_error_callback;
|
||||
tokenerrcontext.arg = (void *) &callback_arg;
|
||||
tokenerrcontext.arg = &callback_arg;
|
||||
tokenerrcontext.previous = error_context_stack;
|
||||
error_context_stack = &tokenerrcontext;
|
||||
|
||||
|
|
|
|||
|
|
@ -2020,7 +2020,7 @@ check_functions_in_node(Node *node, check_function_callback checker,
|
|||
* ... do special actions for other node types
|
||||
* }
|
||||
* // for any node type not specially processed, do:
|
||||
* return expression_tree_walker(node, my_walker, (void *) context);
|
||||
* return expression_tree_walker(node, my_walker, context);
|
||||
* }
|
||||
*
|
||||
* The "context" argument points to a struct that holds whatever context
|
||||
|
|
@ -2893,7 +2893,7 @@ range_table_entry_walker_impl(RangeTblEntry *rte,
|
|||
* ... do special transformations of other node types
|
||||
* }
|
||||
* // for any node type not specially processed, do:
|
||||
* return expression_tree_mutator(node, my_mutator, (void *) context);
|
||||
* return expression_tree_mutator(node, my_mutator, context);
|
||||
* }
|
||||
*
|
||||
* The "context" argument points to a struct that holds whatever context
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ makeParamList(int numParams)
|
|||
retval->paramCompile = NULL;
|
||||
retval->paramCompileArg = NULL;
|
||||
retval->parserSetup = paramlist_parser_setup;
|
||||
retval->parserSetupArg = (void *) retval;
|
||||
retval->parserSetupArg = retval;
|
||||
retval->paramValuesStr = NULL;
|
||||
retval->numParams = numParams;
|
||||
|
||||
|
|
|
|||
|
|
@ -507,5 +507,5 @@ nodeRead(const char *token, int tok_len)
|
|||
break;
|
||||
}
|
||||
|
||||
return (void *) result;
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ geqo(PlannerInfo *root, int number_of_rels, List *initial_rels)
|
|||
#endif
|
||||
|
||||
/* set up private information */
|
||||
root->join_search_private = (void *) &private;
|
||||
root->join_search_private = &private;
|
||||
private.initial_rels = initial_rels;
|
||||
|
||||
/* initialize private number generator */
|
||||
|
|
|
|||
|
|
@ -5029,8 +5029,7 @@ cost_qual_eval_walker(Node *node, cost_qual_eval_context *context)
|
|||
}
|
||||
|
||||
/* recurse into children */
|
||||
return expression_tree_walker(node, cost_qual_eval_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, cost_qual_eval_walker, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -2463,7 +2463,7 @@ match_eclass_clauses_to_index(PlannerInfo *root, IndexOptInfo *index,
|
|||
clauses = generate_implied_equalities_for_column(root,
|
||||
index->rel,
|
||||
ec_member_matches_indexcol,
|
||||
(void *) &arg,
|
||||
&arg,
|
||||
index->rel->lateral_referencers);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -5037,9 +5037,7 @@ replace_nestloop_params_mutator(Node *node, PlannerInfo *root)
|
|||
/* Replace the PlaceHolderVar with a nestloop Param */
|
||||
return (Node *) replace_nestloop_param_placeholdervar(root, phv);
|
||||
}
|
||||
return expression_tree_mutator(node,
|
||||
replace_nestloop_params_mutator,
|
||||
(void *) root);
|
||||
return expression_tree_mutator(node, replace_nestloop_params_mutator, root);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ flatten_unplanned_rtes(PlannerGlobal *glob, RangeTblEntry *rte)
|
|||
/* Use query_tree_walker to find all RTEs in the parse tree */
|
||||
(void) query_tree_walker(rte->subquery,
|
||||
flatten_rtes_walker,
|
||||
(void *) &cxt,
|
||||
&cxt,
|
||||
QTW_EXAMINE_RTES_BEFORE);
|
||||
}
|
||||
|
||||
|
|
@ -516,13 +516,12 @@ flatten_rtes_walker(Node *node, flatten_rtes_walker_context *cxt)
|
|||
cxt->query = (Query *) node;
|
||||
result = query_tree_walker((Query *) node,
|
||||
flatten_rtes_walker,
|
||||
(void *) cxt,
|
||||
cxt,
|
||||
QTW_EXAMINE_RTES_BEFORE);
|
||||
cxt->query = save_query;
|
||||
return result;
|
||||
}
|
||||
return expression_tree_walker(node, flatten_rtes_walker,
|
||||
(void *) cxt);
|
||||
return expression_tree_walker(node, flatten_rtes_walker, cxt);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2243,8 +2242,7 @@ fix_scan_expr_mutator(Node *node, fix_scan_expr_context *context)
|
|||
context->num_exec),
|
||||
context);
|
||||
fix_expr_common(context->root, node);
|
||||
return expression_tree_mutator(node, fix_scan_expr_mutator,
|
||||
(void *) context);
|
||||
return expression_tree_mutator(node, fix_scan_expr_mutator, context);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -2256,8 +2254,7 @@ fix_scan_expr_walker(Node *node, fix_scan_expr_context *context)
|
|||
Assert(!IsA(node, PlaceHolderVar));
|
||||
Assert(!IsA(node, AlternativeSubPlan));
|
||||
fix_expr_common(context->root, node);
|
||||
return expression_tree_walker(node, fix_scan_expr_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, fix_scan_expr_walker, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2612,8 +2609,7 @@ convert_combining_aggrefs(Node *node, void *context)
|
|||
|
||||
return (Node *) parent_agg;
|
||||
}
|
||||
return expression_tree_mutator(node, convert_combining_aggrefs,
|
||||
(void *) context);
|
||||
return expression_tree_mutator(node, convert_combining_aggrefs, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3165,9 +3161,7 @@ fix_join_expr_mutator(Node *node, fix_join_expr_context *context)
|
|||
context->num_exec),
|
||||
context);
|
||||
fix_expr_common(context->root, node);
|
||||
return expression_tree_mutator(node,
|
||||
fix_join_expr_mutator,
|
||||
(void *) context);
|
||||
return expression_tree_mutator(node, fix_join_expr_mutator, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3292,9 +3286,7 @@ fix_upper_expr_mutator(Node *node, fix_upper_expr_context *context)
|
|||
context->num_exec),
|
||||
context);
|
||||
fix_expr_common(context->root, node);
|
||||
return expression_tree_mutator(node,
|
||||
fix_upper_expr_mutator,
|
||||
(void *) context);
|
||||
return expression_tree_mutator(node, fix_upper_expr_mutator, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3390,7 +3382,7 @@ fix_windowagg_condition_expr_mutator(Node *node,
|
|||
|
||||
return expression_tree_mutator(node,
|
||||
fix_windowagg_condition_expr_mutator,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3656,10 +3648,10 @@ extract_query_dependencies_walker(Node *node, PlannerInfo *context)
|
|||
|
||||
/* And recurse into the query's subexpressions */
|
||||
return query_tree_walker(query, extract_query_dependencies_walker,
|
||||
(void *) context, 0);
|
||||
context, 0);
|
||||
}
|
||||
/* Extract function dependencies and check for regclass Consts */
|
||||
fix_expr_common(context, node);
|
||||
return expression_tree_walker(node, extract_query_dependencies_walker,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -697,9 +697,7 @@ convert_testexpr_mutator(Node *node,
|
|||
*/
|
||||
return node;
|
||||
}
|
||||
return expression_tree_mutator(node,
|
||||
convert_testexpr_mutator,
|
||||
(void *) context);
|
||||
return expression_tree_mutator(node, convert_testexpr_mutator, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1121,14 +1119,13 @@ contain_outer_selfref_walker(Node *node, Index *depth)
|
|||
(*depth)++;
|
||||
|
||||
result = query_tree_walker(query, contain_outer_selfref_walker,
|
||||
(void *) depth, QTW_EXAMINE_RTES_BEFORE);
|
||||
depth, QTW_EXAMINE_RTES_BEFORE);
|
||||
|
||||
(*depth)--;
|
||||
|
||||
return result;
|
||||
}
|
||||
return expression_tree_walker(node, contain_outer_selfref_walker,
|
||||
(void *) depth);
|
||||
return expression_tree_walker(node, contain_outer_selfref_walker, depth);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1927,9 +1924,7 @@ replace_correlation_vars_mutator(Node *node, PlannerInfo *root)
|
|||
return (Node *) replace_outer_merge_support(root,
|
||||
(MergeSupportFunc *) node);
|
||||
}
|
||||
return expression_tree_mutator(node,
|
||||
replace_correlation_vars_mutator,
|
||||
(void *) root);
|
||||
return expression_tree_mutator(node, replace_correlation_vars_mutator, root);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2077,7 +2072,7 @@ process_sublinks_mutator(Node *node, process_sublinks_context *context)
|
|||
|
||||
return expression_tree_mutator(node,
|
||||
process_sublinks_mutator,
|
||||
(void *) &locContext);
|
||||
&locContext);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2985,8 +2980,7 @@ finalize_primnode(Node *node, finalize_primnode_context *context)
|
|||
|
||||
return false; /* no more to do here */
|
||||
}
|
||||
return expression_tree_walker(node, finalize_primnode,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, finalize_primnode, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3008,8 +3002,7 @@ finalize_agg_primnode(Node *node, finalize_primnode_context *context)
|
|||
finalize_primnode((Node *) agg->aggfilter, context);
|
||||
return false; /* there can't be any Aggrefs below here */
|
||||
}
|
||||
return expression_tree_walker(node, finalize_agg_primnode,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, finalize_agg_primnode, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -359,8 +359,7 @@ preprocess_aggrefs_walker(Node *node, PlannerInfo *root)
|
|||
return false;
|
||||
}
|
||||
Assert(!IsA(node, SubLink));
|
||||
return expression_tree_walker(node, preprocess_aggrefs_walker,
|
||||
(void *) root);
|
||||
return expression_tree_walker(node, preprocess_aggrefs_walker, root);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2450,7 +2450,7 @@ pullup_replace_vars(Node *expr, pullup_replace_vars_context *context)
|
|||
return replace_rte_variables(expr,
|
||||
context->varno, 0,
|
||||
pullup_replace_vars_callback,
|
||||
(void *) context,
|
||||
context,
|
||||
context->outer_hasSubLinks);
|
||||
}
|
||||
|
||||
|
|
@ -2707,7 +2707,7 @@ pullup_replace_vars_subquery(Query *query,
|
|||
return (Query *) replace_rte_variables((Node *) query,
|
||||
context->varno, 1,
|
||||
pullup_replace_vars_callback,
|
||||
(void *) context,
|
||||
context,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
|
@ -3775,7 +3775,7 @@ find_dependent_phvs_walker(Node *node,
|
|||
context->sublevels_up++;
|
||||
result = query_tree_walker((Query *) node,
|
||||
find_dependent_phvs_walker,
|
||||
(void *) context, 0);
|
||||
context, 0);
|
||||
context->sublevels_up--;
|
||||
return result;
|
||||
}
|
||||
|
|
@ -3784,8 +3784,7 @@ find_dependent_phvs_walker(Node *node,
|
|||
Assert(!IsA(node, PlaceHolderInfo));
|
||||
Assert(!IsA(node, MinMaxAggInfo));
|
||||
|
||||
return expression_tree_walker(node, find_dependent_phvs_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, find_dependent_phvs_walker, context);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -3800,15 +3799,12 @@ find_dependent_phvs(PlannerInfo *root, int varno)
|
|||
context.relids = bms_make_singleton(varno);
|
||||
context.sublevels_up = 0;
|
||||
|
||||
if (query_tree_walker(root->parse,
|
||||
find_dependent_phvs_walker,
|
||||
(void *) &context,
|
||||
0))
|
||||
if (query_tree_walker(root->parse, find_dependent_phvs_walker, &context, 0))
|
||||
return true;
|
||||
/* The append_rel_list could be populated already, so check it too */
|
||||
if (expression_tree_walker((Node *) root->append_rel_list,
|
||||
find_dependent_phvs_walker,
|
||||
(void *) &context))
|
||||
&context))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -3847,10 +3843,7 @@ find_dependent_phvs_in_jointree(PlannerInfo *root, Node *node, int varno)
|
|||
RangeTblEntry *rte = rt_fetch(relid, root->parse->rtable);
|
||||
|
||||
if (rte->lateral &&
|
||||
range_table_entry_walker(rte,
|
||||
find_dependent_phvs_walker,
|
||||
(void *) &context,
|
||||
0))
|
||||
range_table_entry_walker(rte, find_dependent_phvs_walker, &context, 0))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -3907,7 +3900,7 @@ substitute_phv_relids_walker(Node *node,
|
|||
context->sublevels_up++;
|
||||
result = query_tree_walker((Query *) node,
|
||||
substitute_phv_relids_walker,
|
||||
(void *) context, 0);
|
||||
context, 0);
|
||||
context->sublevels_up--;
|
||||
return result;
|
||||
}
|
||||
|
|
@ -3917,8 +3910,7 @@ substitute_phv_relids_walker(Node *node,
|
|||
Assert(!IsA(node, PlaceHolderInfo));
|
||||
Assert(!IsA(node, MinMaxAggInfo));
|
||||
|
||||
return expression_tree_walker(node, substitute_phv_relids_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, substitute_phv_relids_walker, context);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -3935,7 +3927,7 @@ substitute_phv_relids(Node *node, int varno, Relids subrelids)
|
|||
*/
|
||||
query_or_expression_tree_walker(node,
|
||||
substitute_phv_relids_walker,
|
||||
(void *) &context,
|
||||
&context,
|
||||
0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ adjust_appendrel_attrs_mutator(Node *node,
|
|||
|
||||
phv = (PlaceHolderVar *) expression_tree_mutator(node,
|
||||
adjust_appendrel_attrs_mutator,
|
||||
(void *) context);
|
||||
context);
|
||||
/* now fix PlaceHolderVar's relid sets */
|
||||
if (phv->phlevelsup == 0)
|
||||
{
|
||||
|
|
@ -509,8 +509,7 @@ adjust_appendrel_attrs_mutator(Node *node,
|
|||
Assert(!IsA(node, RangeTblRef));
|
||||
Assert(!IsA(node, JoinExpr));
|
||||
|
||||
return expression_tree_mutator(node, adjust_appendrel_attrs_mutator,
|
||||
(void *) context);
|
||||
return expression_tree_mutator(node, adjust_appendrel_attrs_mutator, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -265,8 +265,7 @@ find_window_functions_walker(Node *node, WindowFuncLists *lists)
|
|||
return false;
|
||||
}
|
||||
Assert(!IsA(node, SubLink));
|
||||
return expression_tree_walker(node, find_window_functions_walker,
|
||||
(void *) lists);
|
||||
return expression_tree_walker(node, find_window_functions_walker, lists);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1217,7 +1216,7 @@ contain_context_dependent_node_walker(Node *node, int *flags)
|
|||
*flags |= CCDN_CASETESTEXPR_OK;
|
||||
res = expression_tree_walker(node,
|
||||
contain_context_dependent_node_walker,
|
||||
(void *) flags);
|
||||
flags);
|
||||
*flags = save_flags;
|
||||
return res;
|
||||
}
|
||||
|
|
@ -1241,7 +1240,7 @@ contain_context_dependent_node_walker(Node *node, int *flags)
|
|||
return res;
|
||||
}
|
||||
return expression_tree_walker(node, contain_context_dependent_node_walker,
|
||||
(void *) flags);
|
||||
flags);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
@ -2416,7 +2415,7 @@ estimate_expression_value(PlannerInfo *root, Node *node)
|
|||
*/
|
||||
#define ece_generic_processing(node) \
|
||||
expression_tree_mutator((Node *) (node), eval_const_expressions_mutator, \
|
||||
(void *) context)
|
||||
context)
|
||||
|
||||
/*
|
||||
* Check whether all arguments of the given node were reduced to Consts.
|
||||
|
|
@ -2552,7 +2551,7 @@ eval_const_expressions_mutator(Node *node,
|
|||
args = (List *)
|
||||
expression_tree_mutator((Node *) args,
|
||||
eval_const_expressions_mutator,
|
||||
(void *) context);
|
||||
context);
|
||||
/* ... and the filter expression, which isn't */
|
||||
aggfilter = (Expr *)
|
||||
eval_const_expressions_mutator((Node *) expr->aggfilter,
|
||||
|
|
@ -2697,7 +2696,7 @@ eval_const_expressions_mutator(Node *node,
|
|||
*/
|
||||
args = (List *) expression_tree_mutator((Node *) expr->args,
|
||||
eval_const_expressions_mutator,
|
||||
(void *) context);
|
||||
context);
|
||||
|
||||
/*
|
||||
* We must do our own check for NULLs because DistinctExpr has
|
||||
|
|
@ -4094,7 +4093,7 @@ simplify_function(Oid funcid, Oid result_type, int32 result_typmod,
|
|||
args = expand_function_arguments(args, false, result_type, func_tuple);
|
||||
args = (List *) expression_tree_mutator((Node *) args,
|
||||
eval_const_expressions_mutator,
|
||||
(void *) context);
|
||||
context);
|
||||
/* Argument processing done, give it back to the caller */
|
||||
*args_p = args;
|
||||
}
|
||||
|
|
@ -4636,7 +4635,7 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid,
|
|||
callback_arg.prosrc = src;
|
||||
|
||||
sqlerrcontext.callback = sql_inline_error_callback;
|
||||
sqlerrcontext.arg = (void *) &callback_arg;
|
||||
sqlerrcontext.arg = &callback_arg;
|
||||
sqlerrcontext.previous = error_context_stack;
|
||||
error_context_stack = &sqlerrcontext;
|
||||
|
||||
|
|
@ -4938,8 +4937,7 @@ substitute_actual_parameters_mutator(Node *node,
|
|||
/* We don't need to copy at this time (it'll get done later) */
|
||||
return list_nth(context->args, param->paramid - 1);
|
||||
}
|
||||
return expression_tree_mutator(node, substitute_actual_parameters_mutator,
|
||||
(void *) context);
|
||||
return expression_tree_mutator(node, substitute_actual_parameters_mutator, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -5190,7 +5188,7 @@ inline_set_returning_function(PlannerInfo *root, RangeTblEntry *rte)
|
|||
callback_arg.prosrc = src;
|
||||
|
||||
sqlerrcontext.callback = sql_inline_error_callback;
|
||||
sqlerrcontext.arg = (void *) &callback_arg;
|
||||
sqlerrcontext.arg = &callback_arg;
|
||||
sqlerrcontext.previous = error_context_stack;
|
||||
error_context_stack = &sqlerrcontext;
|
||||
|
||||
|
|
@ -5382,7 +5380,7 @@ substitute_actual_srf_parameters_mutator(Node *node,
|
|||
context->sublevels_up++;
|
||||
result = (Node *) query_tree_mutator((Query *) node,
|
||||
substitute_actual_srf_parameters_mutator,
|
||||
(void *) context,
|
||||
context,
|
||||
0);
|
||||
context->sublevels_up--;
|
||||
return result;
|
||||
|
|
@ -5407,7 +5405,7 @@ substitute_actual_srf_parameters_mutator(Node *node,
|
|||
}
|
||||
return expression_tree_mutator(node,
|
||||
substitute_actual_srf_parameters_mutator,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -5436,6 +5434,5 @@ pull_paramids_walker(Node *node, Bitmapset **context)
|
|||
*context = bms_add_member(*context, param->paramid);
|
||||
return false;
|
||||
}
|
||||
return expression_tree_walker(node, pull_paramids_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, pull_paramids_walker, context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -908,7 +908,7 @@ static void
|
|||
list_startup_fn(Node *clause, PredIterInfo info)
|
||||
{
|
||||
info->state_list = (List *) clause;
|
||||
info->state = (void *) list_head(info->state_list);
|
||||
info->state = list_head(info->state_list);
|
||||
}
|
||||
|
||||
static Node *
|
||||
|
|
@ -920,7 +920,7 @@ list_next_fn(PredIterInfo info)
|
|||
if (l == NULL)
|
||||
return NULL;
|
||||
n = lfirst(l);
|
||||
info->state = (void *) lnext(info->state_list, l);
|
||||
info->state = lnext(info->state_list, l);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
@ -938,7 +938,7 @@ static void
|
|||
boolexpr_startup_fn(Node *clause, PredIterInfo info)
|
||||
{
|
||||
info->state_list = ((BoolExpr *) clause)->args;
|
||||
info->state = (void *) list_head(info->state_list);
|
||||
info->state = list_head(info->state_list);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -968,7 +968,7 @@ arrayconst_startup_fn(Node *clause, PredIterInfo info)
|
|||
|
||||
/* Create working state struct */
|
||||
state = (ArrayConstIterState *) palloc(sizeof(ArrayConstIterState));
|
||||
info->state = (void *) state;
|
||||
info->state = state;
|
||||
|
||||
/* Deconstruct the array literal */
|
||||
arrayconst = (Const *) lsecond(saop->args);
|
||||
|
|
@ -1047,7 +1047,7 @@ arrayexpr_startup_fn(Node *clause, PredIterInfo info)
|
|||
|
||||
/* Create working state struct */
|
||||
state = (ArrayExprIterState *) palloc(sizeof(ArrayExprIterState));
|
||||
info->state = (void *) state;
|
||||
info->state = state;
|
||||
|
||||
/* Set up a dummy OpExpr to return as the per-item node */
|
||||
state->opexpr.xpr.type = T_OpExpr;
|
||||
|
|
|
|||
|
|
@ -1139,8 +1139,7 @@ split_pathtarget_walker(Node *node, split_pathtarget_context *context)
|
|||
context->current_depth = 0;
|
||||
context->current_sgref = 0; /* subexpressions are not sortgroup items */
|
||||
|
||||
(void) expression_tree_walker(node, split_pathtarget_walker,
|
||||
(void *) context);
|
||||
(void) expression_tree_walker(node, split_pathtarget_walker, context);
|
||||
|
||||
/* Depth is one more than any SRF below it */
|
||||
srf_depth = context->current_depth + 1;
|
||||
|
|
@ -1181,8 +1180,7 @@ split_pathtarget_walker(Node *node, split_pathtarget_context *context)
|
|||
* examine its inputs.
|
||||
*/
|
||||
context->current_sgref = 0; /* subexpressions are not sortgroup items */
|
||||
return expression_tree_walker(node, split_pathtarget_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, split_pathtarget_walker, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ pull_varnos(PlannerInfo *root, Node *node)
|
|||
*/
|
||||
query_or_expression_tree_walker(node,
|
||||
pull_varnos_walker,
|
||||
(void *) &context,
|
||||
&context,
|
||||
0);
|
||||
|
||||
return context.varnos;
|
||||
|
|
@ -150,7 +150,7 @@ pull_varnos_of_level(PlannerInfo *root, Node *node, int levelsup)
|
|||
*/
|
||||
query_or_expression_tree_walker(node,
|
||||
pull_varnos_walker,
|
||||
(void *) &context,
|
||||
&context,
|
||||
0);
|
||||
|
||||
return context.varnos;
|
||||
|
|
@ -269,12 +269,11 @@ pull_varnos_walker(Node *node, pull_varnos_context *context)
|
|||
|
||||
context->sublevels_up++;
|
||||
result = query_tree_walker((Query *) node, pull_varnos_walker,
|
||||
(void *) context, 0);
|
||||
context, 0);
|
||||
context->sublevels_up--;
|
||||
return result;
|
||||
}
|
||||
return expression_tree_walker(node, pull_varnos_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, pull_varnos_walker, context);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -324,8 +323,7 @@ pull_varattnos_walker(Node *node, pull_varattnos_context *context)
|
|||
/* Should not find an unplanned subquery */
|
||||
Assert(!IsA(node, Query));
|
||||
|
||||
return expression_tree_walker(node, pull_varattnos_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, pull_varattnos_walker, context);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -350,7 +348,7 @@ pull_vars_of_level(Node *node, int levelsup)
|
|||
*/
|
||||
query_or_expression_tree_walker(node,
|
||||
pull_vars_walker,
|
||||
(void *) &context,
|
||||
&context,
|
||||
0);
|
||||
|
||||
return context.vars;
|
||||
|
|
@ -385,12 +383,11 @@ pull_vars_walker(Node *node, pull_vars_context *context)
|
|||
|
||||
context->sublevels_up++;
|
||||
result = query_tree_walker((Query *) node, pull_vars_walker,
|
||||
(void *) context, 0);
|
||||
context, 0);
|
||||
context->sublevels_up--;
|
||||
return result;
|
||||
}
|
||||
return expression_tree_walker(node, pull_vars_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, pull_vars_walker, context);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -449,7 +446,7 @@ contain_vars_of_level(Node *node, int levelsup)
|
|||
|
||||
return query_or_expression_tree_walker(node,
|
||||
contain_vars_of_level_walker,
|
||||
(void *) &sublevels_up,
|
||||
&sublevels_up,
|
||||
0);
|
||||
}
|
||||
|
||||
|
|
@ -484,14 +481,14 @@ contain_vars_of_level_walker(Node *node, int *sublevels_up)
|
|||
(*sublevels_up)++;
|
||||
result = query_tree_walker((Query *) node,
|
||||
contain_vars_of_level_walker,
|
||||
(void *) sublevels_up,
|
||||
sublevels_up,
|
||||
0);
|
||||
(*sublevels_up)--;
|
||||
return result;
|
||||
}
|
||||
return expression_tree_walker(node,
|
||||
contain_vars_of_level_walker,
|
||||
(void *) sublevels_up);
|
||||
sublevels_up);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -520,7 +517,7 @@ locate_var_of_level(Node *node, int levelsup)
|
|||
|
||||
(void) query_or_expression_tree_walker(node,
|
||||
locate_var_of_level_walker,
|
||||
(void *) &context,
|
||||
&context,
|
||||
0);
|
||||
|
||||
return context.var_location;
|
||||
|
|
@ -558,14 +555,14 @@ locate_var_of_level_walker(Node *node,
|
|||
context->sublevels_up++;
|
||||
result = query_tree_walker((Query *) node,
|
||||
locate_var_of_level_walker,
|
||||
(void *) context,
|
||||
context,
|
||||
0);
|
||||
context->sublevels_up--;
|
||||
return result;
|
||||
}
|
||||
return expression_tree_walker(node,
|
||||
locate_var_of_level_walker,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -707,8 +704,7 @@ pull_var_clause_walker(Node *node, pull_var_clause_context *context)
|
|||
else
|
||||
elog(ERROR, "PlaceHolderVar found where not expected");
|
||||
}
|
||||
return expression_tree_walker(node, pull_var_clause_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, pull_var_clause_walker, context);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -867,7 +863,7 @@ flatten_join_alias_vars_mutator(Node *node,
|
|||
|
||||
phv = (PlaceHolderVar *) expression_tree_mutator(node,
|
||||
flatten_join_alias_vars_mutator,
|
||||
(void *) context);
|
||||
context);
|
||||
/* now fix PlaceHolderVar's relid sets */
|
||||
if (phv->phlevelsup == context->sublevels_up)
|
||||
{
|
||||
|
|
@ -889,7 +885,7 @@ flatten_join_alias_vars_mutator(Node *node,
|
|||
context->inserted_sublink = ((Query *) node)->hasSubLinks;
|
||||
newnode = query_tree_mutator((Query *) node,
|
||||
flatten_join_alias_vars_mutator,
|
||||
(void *) context,
|
||||
context,
|
||||
QTW_IGNORE_JOINALIASES);
|
||||
newnode->hasSubLinks |= context->inserted_sublink;
|
||||
context->inserted_sublink = save_inserted_sublink;
|
||||
|
|
@ -904,8 +900,7 @@ flatten_join_alias_vars_mutator(Node *node,
|
|||
Assert(!IsA(node, PlaceHolderInfo));
|
||||
Assert(!IsA(node, MinMaxAggInfo));
|
||||
|
||||
return expression_tree_mutator(node, flatten_join_alias_vars_mutator,
|
||||
(void *) context);
|
||||
return expression_tree_mutator(node, flatten_join_alias_vars_mutator, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1044,7 +1039,7 @@ flatten_group_exprs_mutator(Node *node,
|
|||
context->inserted_sublink = ((Query *) node)->hasSubLinks;
|
||||
newnode = query_tree_mutator((Query *) node,
|
||||
flatten_group_exprs_mutator,
|
||||
(void *) context,
|
||||
context,
|
||||
QTW_IGNORE_GROUPEXPRS);
|
||||
newnode->hasSubLinks |= context->inserted_sublink;
|
||||
context->inserted_sublink = save_inserted_sublink;
|
||||
|
|
@ -1053,7 +1048,7 @@ flatten_group_exprs_mutator(Node *node,
|
|||
}
|
||||
|
||||
return expression_tree_mutator(node, flatten_group_exprs_mutator,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1687,7 +1687,7 @@ transformValuesClause(ParseState *pstate, SelectStmt *stmt)
|
|||
Node *col = (Node *) lfirst(lc);
|
||||
|
||||
col = coerce_to_common_type(pstate, col, coltype, "VALUES");
|
||||
lfirst(lc) = (void *) col;
|
||||
lfirst(lc) = col;
|
||||
}
|
||||
|
||||
coltypmod = select_common_typmod(pstate, colexprs[i], coltype);
|
||||
|
|
|
|||
|
|
@ -799,7 +799,7 @@ check_agg_arguments_walker(Node *node,
|
|||
context->sublevels_up++;
|
||||
result = query_tree_walker((Query *) node,
|
||||
check_agg_arguments_walker,
|
||||
(void *) context,
|
||||
context,
|
||||
0);
|
||||
context->sublevels_up--;
|
||||
return result;
|
||||
|
|
@ -807,7 +807,7 @@ check_agg_arguments_walker(Node *node,
|
|||
|
||||
return expression_tree_walker(node,
|
||||
check_agg_arguments_walker,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1517,13 +1517,13 @@ substitute_grouped_columns_mutator(Node *node,
|
|||
context->sublevels_up++;
|
||||
newnode = query_tree_mutator((Query *) node,
|
||||
substitute_grouped_columns_mutator,
|
||||
(void *) context,
|
||||
context,
|
||||
0);
|
||||
context->sublevels_up--;
|
||||
return (Node *) newnode;
|
||||
}
|
||||
return expression_tree_mutator(node, substitute_grouped_columns_mutator,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1691,13 +1691,13 @@ finalize_grouping_exprs_walker(Node *node,
|
|||
context->sublevels_up++;
|
||||
result = query_tree_walker((Query *) node,
|
||||
finalize_grouping_exprs_walker,
|
||||
(void *) context,
|
||||
context,
|
||||
0);
|
||||
context->sublevels_up--;
|
||||
return result;
|
||||
}
|
||||
return expression_tree_walker(node, finalize_grouping_exprs_walker,
|
||||
(void *) context);
|
||||
context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ assign_query_collations(ParseState *pstate, Query *query)
|
|||
*/
|
||||
(void) query_tree_walker(query,
|
||||
assign_query_collations_walker,
|
||||
(void *) pstate,
|
||||
pstate,
|
||||
QTW_IGNORE_RANGE_TABLE |
|
||||
QTW_IGNORE_CTE_SUBQUERIES);
|
||||
}
|
||||
|
|
@ -295,7 +295,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
|||
|
||||
(void) expression_tree_walker(node,
|
||||
assign_collations_walker,
|
||||
(void *) &loccontext);
|
||||
&loccontext);
|
||||
|
||||
collation = expr->collOid;
|
||||
Assert(OidIsValid(collation));
|
||||
|
|
@ -317,7 +317,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
|||
/* ... but first, recurse */
|
||||
(void) expression_tree_walker(node,
|
||||
assign_collations_walker,
|
||||
(void *) &loccontext);
|
||||
&loccontext);
|
||||
|
||||
if (OidIsValid(expr->resultcollid))
|
||||
{
|
||||
|
|
@ -403,7 +403,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
|||
/* ... but first, recurse */
|
||||
(void) expression_tree_walker(node,
|
||||
assign_collations_walker,
|
||||
(void *) &loccontext);
|
||||
&loccontext);
|
||||
|
||||
if (OidIsValid(typcollation))
|
||||
{
|
||||
|
|
@ -444,7 +444,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
|||
case T_TargetEntry:
|
||||
(void) expression_tree_walker(node,
|
||||
assign_collations_walker,
|
||||
(void *) &loccontext);
|
||||
&loccontext);
|
||||
|
||||
/*
|
||||
* TargetEntry can have only one child, and should bubble that
|
||||
|
|
@ -488,7 +488,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
|||
case T_MergeAction:
|
||||
(void) expression_tree_walker(node,
|
||||
assign_collations_walker,
|
||||
(void *) &loccontext);
|
||||
&loccontext);
|
||||
|
||||
/*
|
||||
* When we're invoked on a query's jointree, we don't need to do
|
||||
|
|
@ -528,7 +528,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
|||
case T_List:
|
||||
(void) expression_tree_walker(node,
|
||||
assign_collations_walker,
|
||||
(void *) &loccontext);
|
||||
&loccontext);
|
||||
|
||||
/*
|
||||
* When processing a list, collation state just bubbles up from
|
||||
|
|
@ -699,7 +699,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
|
|||
*/
|
||||
(void) expression_tree_walker(node,
|
||||
assign_collations_walker,
|
||||
(void *) &loccontext);
|
||||
&loccontext);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -746,7 +746,7 @@ makeDependencyGraphWalker(Node *node, CteState *cstate)
|
|||
}
|
||||
(void) raw_expression_tree_walker(node,
|
||||
makeDependencyGraphWalker,
|
||||
(void *) cstate);
|
||||
cstate);
|
||||
cstate->innerwiths = list_delete_first(cstate->innerwiths);
|
||||
}
|
||||
else
|
||||
|
|
@ -768,7 +768,7 @@ makeDependencyGraphWalker(Node *node, CteState *cstate)
|
|||
}
|
||||
(void) raw_expression_tree_walker(node,
|
||||
makeDependencyGraphWalker,
|
||||
(void *) cstate);
|
||||
cstate);
|
||||
cstate->innerwiths = list_delete_first(cstate->innerwiths);
|
||||
}
|
||||
/* We're done examining the SelectStmt */
|
||||
|
|
@ -787,7 +787,7 @@ makeDependencyGraphWalker(Node *node, CteState *cstate)
|
|||
}
|
||||
return raw_expression_tree_walker(node,
|
||||
makeDependencyGraphWalker,
|
||||
(void *) cstate);
|
||||
cstate);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1130,7 +1130,7 @@ checkWellFormedRecursionWalker(Node *node, CteState *cstate)
|
|||
}
|
||||
return raw_expression_tree_walker(node,
|
||||
checkWellFormedRecursionWalker,
|
||||
(void *) cstate);
|
||||
cstate);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1147,7 +1147,7 @@ checkWellFormedSelectStmt(SelectStmt *stmt, CteState *cstate)
|
|||
/* just recurse without changing state */
|
||||
raw_expression_tree_walker((Node *) stmt,
|
||||
checkWellFormedRecursionWalker,
|
||||
(void *) cstate);
|
||||
cstate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1157,7 +1157,7 @@ checkWellFormedSelectStmt(SelectStmt *stmt, CteState *cstate)
|
|||
case SETOP_UNION:
|
||||
raw_expression_tree_walker((Node *) stmt,
|
||||
checkWellFormedRecursionWalker,
|
||||
(void *) cstate);
|
||||
cstate);
|
||||
break;
|
||||
case SETOP_INTERSECT:
|
||||
if (stmt->all)
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ setup_parser_errposition_callback(ParseCallbackState *pcbstate,
|
|||
pcbstate->pstate = pstate;
|
||||
pcbstate->location = location;
|
||||
pcbstate->errcallback.callback = pcb_error_callback;
|
||||
pcbstate->errcallback.arg = (void *) pcbstate;
|
||||
pcbstate->errcallback.arg = pcbstate;
|
||||
pcbstate->errcallback.previous = error_context_stack;
|
||||
error_context_stack = &pcbstate->errcallback;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ setup_parse_fixed_parameters(ParseState *pstate,
|
|||
|
||||
parstate->paramTypes = paramTypes;
|
||||
parstate->numParams = numParams;
|
||||
pstate->p_ref_hook_state = (void *) parstate;
|
||||
pstate->p_ref_hook_state = parstate;
|
||||
pstate->p_paramref_hook = fixed_paramref_hook;
|
||||
/* no need to use p_coerce_param_hook */
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ setup_parse_variable_parameters(ParseState *pstate,
|
|||
|
||||
parstate->paramTypes = paramTypes;
|
||||
parstate->numParams = numParams;
|
||||
pstate->p_ref_hook_state = (void *) parstate;
|
||||
pstate->p_ref_hook_state = parstate;
|
||||
pstate->p_paramref_hook = variable_paramref_hook;
|
||||
pstate->p_coerce_param_hook = variable_coerce_param_hook;
|
||||
}
|
||||
|
|
@ -274,7 +274,7 @@ check_variable_parameters(ParseState *pstate, Query *query)
|
|||
if (*parstate->numParams > 0)
|
||||
(void) query_tree_walker(query,
|
||||
check_parameter_resolution_walker,
|
||||
(void *) pstate, 0);
|
||||
pstate, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -318,10 +318,10 @@ check_parameter_resolution_walker(Node *node, ParseState *pstate)
|
|||
/* Recurse into RTE subquery or not-yet-planned sublink subquery */
|
||||
return query_tree_walker((Query *) node,
|
||||
check_parameter_resolution_walker,
|
||||
(void *) pstate, 0);
|
||||
pstate, 0);
|
||||
}
|
||||
return expression_tree_walker(node, check_parameter_resolution_walker,
|
||||
(void *) pstate);
|
||||
pstate);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1205,7 +1205,7 @@ setup_scanner_errposition_callback(ScannerCallbackState *scbstate,
|
|||
scbstate->yyscanner = yyscanner;
|
||||
scbstate->location = location;
|
||||
scbstate->errcallback.callback = scb_error_callback;
|
||||
scbstate->errcallback.arg = (void *) scbstate;
|
||||
scbstate->errcallback.arg = scbstate;
|
||||
scbstate->errcallback.previous = error_context_stack;
|
||||
error_context_stack = &scbstate->errcallback;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3365,8 +3365,7 @@ pull_exec_paramids_walker(Node *node, Bitmapset **context)
|
|||
*context = bms_add_member(*context, param->paramid);
|
||||
return false;
|
||||
}
|
||||
return expression_tree_walker(node, pull_exec_paramids_walker,
|
||||
(void *) context);
|
||||
return expression_tree_walker(node, pull_exec_paramids_walker, context);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ static void
|
|||
IpcMemoryDetach(int status, Datum shmaddr)
|
||||
{
|
||||
/* Detach System V shared memory block. */
|
||||
if (shmdt((void *) DatumGetPointer(shmaddr)) < 0)
|
||||
if (shmdt(DatumGetPointer(shmaddr)) < 0)
|
||||
elog(LOG, "shmdt(%p) failed: %m", DatumGetPointer(shmaddr));
|
||||
}
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ PGSharedMemoryIsInUse(unsigned long id1, unsigned long id2)
|
|||
IpcMemoryState state;
|
||||
|
||||
state = PGSharedMemoryAttach((IpcMemoryId) id2, NULL, &memAddress);
|
||||
if (memAddress && shmdt((void *) memAddress) < 0)
|
||||
if (memAddress && shmdt(memAddress) < 0)
|
||||
elog(LOG, "shmdt(%p) failed: %m", memAddress);
|
||||
switch (state)
|
||||
{
|
||||
|
|
@ -835,7 +835,7 @@ PGSharedMemoryCreate(Size size,
|
|||
break;
|
||||
}
|
||||
|
||||
if (oldhdr && shmdt((void *) oldhdr) < 0)
|
||||
if (oldhdr && shmdt(oldhdr) < 0)
|
||||
elog(LOG, "shmdt(%p) failed: %m", oldhdr);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -800,7 +800,7 @@ startup_cb_wrapper(LogicalDecodingContext *ctx, OutputPluginOptions *opt, bool i
|
|||
state.callback_name = "startup";
|
||||
state.report_location = InvalidXLogRecPtr;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -828,7 +828,7 @@ shutdown_cb_wrapper(LogicalDecodingContext *ctx)
|
|||
state.callback_name = "shutdown";
|
||||
state.report_location = InvalidXLogRecPtr;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -862,7 +862,7 @@ begin_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn)
|
|||
state.callback_name = "begin";
|
||||
state.report_location = txn->first_lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -894,7 +894,7 @@ commit_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "commit";
|
||||
state.report_location = txn->final_lsn; /* beginning of commit record */
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -935,7 +935,7 @@ begin_prepare_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn)
|
|||
state.callback_name = "begin_prepare";
|
||||
state.report_location = txn->first_lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -980,7 +980,7 @@ prepare_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "prepare";
|
||||
state.report_location = txn->final_lsn; /* beginning of prepare record */
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1025,7 +1025,7 @@ commit_prepared_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "commit_prepared";
|
||||
state.report_location = txn->final_lsn; /* beginning of commit record */
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1071,7 +1071,7 @@ rollback_prepared_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "rollback_prepared";
|
||||
state.report_location = txn->final_lsn; /* beginning of commit record */
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1114,7 +1114,7 @@ change_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "change";
|
||||
state.report_location = change->lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1156,7 +1156,7 @@ truncate_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "truncate";
|
||||
state.report_location = change->lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1195,7 +1195,7 @@ filter_prepare_cb_wrapper(LogicalDecodingContext *ctx, TransactionId xid,
|
|||
state.callback_name = "filter_prepare";
|
||||
state.report_location = InvalidXLogRecPtr;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1226,7 +1226,7 @@ filter_by_origin_cb_wrapper(LogicalDecodingContext *ctx, RepOriginId origin_id)
|
|||
state.callback_name = "filter_by_origin";
|
||||
state.report_location = InvalidXLogRecPtr;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1262,7 +1262,7 @@ message_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "message";
|
||||
state.report_location = message_lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1298,7 +1298,7 @@ stream_start_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "stream_start";
|
||||
state.report_location = first_lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1347,7 +1347,7 @@ stream_stop_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "stream_stop";
|
||||
state.report_location = last_lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1396,7 +1396,7 @@ stream_abort_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "stream_abort";
|
||||
state.report_location = abort_lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1441,7 +1441,7 @@ stream_prepare_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "stream_prepare";
|
||||
state.report_location = txn->final_lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1482,7 +1482,7 @@ stream_commit_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "stream_commit";
|
||||
state.report_location = txn->final_lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1523,7 +1523,7 @@ stream_change_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "stream_change";
|
||||
state.report_location = change->lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1577,7 +1577,7 @@ stream_message_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "stream_message";
|
||||
state.report_location = message_lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1618,7 +1618,7 @@ stream_truncate_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "stream_truncate";
|
||||
state.report_location = change->lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
@ -1657,7 +1657,7 @@ update_progress_txn_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
|||
state.callback_name = "update_progress_txn";
|
||||
state.report_location = lsn;
|
||||
errcallback.callback = output_plugin_error_callback;
|
||||
errcallback.arg = (void *) &state;
|
||||
errcallback.arg = &state;
|
||||
errcallback.previous = error_context_stack;
|
||||
error_context_stack = &errcallback;
|
||||
|
||||
|
|
|
|||
|
|
@ -760,7 +760,7 @@ copy_read_data(void *outbuf, int minread, int maxread)
|
|||
if (avail > maxread)
|
||||
avail = maxread;
|
||||
memcpy(outbuf, ©buf->data[copybuf->cursor], avail);
|
||||
outbuf = (void *) ((char *) outbuf + avail);
|
||||
outbuf = (char *) outbuf + avail;
|
||||
copybuf->cursor += avail;
|
||||
maxread -= avail;
|
||||
bytesread += avail;
|
||||
|
|
|
|||
|
|
@ -2546,7 +2546,7 @@ check_synchronized_standby_slots(char **newval, void **extra, GucSource source)
|
|||
ptr += strlen(slot_name) + 1;
|
||||
}
|
||||
|
||||
*extra = (void *) config;
|
||||
*extra = config;
|
||||
|
||||
pfree(rawname);
|
||||
list_free(elemlist);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user