mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03: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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user