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",
/* 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) */
UnlockReleaseBuffer(buffer);
- index->rd_amcache = (void *) opts;
+ index->rd_amcache = opts;
}
memcpy(&state->opts, index->rd_amcache, sizeof(state->opts));
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); */
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));
}
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));
}
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); */
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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); */
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));
}
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));
}
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));
}
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); */
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); */
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
/*
&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);
festate->options = options;
festate->cstate = cstate;
- node->fdw_state = (void *) festate;
+ node->fdw_state = festate;
}
/*
/* 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;
/* 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;
st = (HStore *) palloc(VARSIZE(hs));
memcpy(st, hs, VARSIZE(hs));
- funcctx->user_fctx = (void *) st;
+ funcctx->user_fctx = st;
if (fcinfo)
{
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);
}
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);
}
}
return execute(GETQUERY(query) + query->size - 1,
- (void *) &gcv, NULL, true,
+ &gcv, NULL, true,
checkcondition_gin);
}
_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); */
{
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);
{
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);
{
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);
while (num > 0)
{
- if (array_iterator(_tree, ltq_regex, (void *) query, NULL))
+ if (array_iterator(_tree, ltq_regex, query, NULL))
{
res = true;
break;
{
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);
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);
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);
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);
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);
if (cache)
pfree(cache);
- fcinfo->flinfo->fn_extra = (void *) newcache;
+ fcinfo->flinfo->fn_extra = newcache;
cache = newcache;
}
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;
* 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;
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 */
* 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
* 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
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;
* 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
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
Assert(bsearch_arg(&value, &ranges->values[2 * ranges->nranges],
ranges->nsorted, sizeof(Datum),
- compare_values, (void *) &cxt) == NULL);
+ compare_values, &cxt) == NULL);
}
}
#endif
/* 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];
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
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) */
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
{
ginCombineData,
ginAllocEntryAccumulator,
NULL, /* no freefunc needed */
- (void *) accum);
+ accum);
}
/*
* 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);
oldCtx = MemoryContextSwitchTo(indexInfo->ii_Context);
ginstate = (GinState *) palloc(sizeof(GinState));
initGinState(ginstate, index);
- indexInfo->ii_AmCache = (void *) ginstate;
+ indexInfo->ii_AmCache = ginstate;
MemoryContextSwitchTo(oldCtx);
}
oldCxt = MemoryContextSwitchTo(indexInfo->ii_Context);
giststate = initGISTstate(r);
giststate->tempCxt = createTempGistContext();
- indexInfo->ii_AmCache = (void *) giststate;
+ indexInfo->ii_AmCache = giststate;
MemoryContextSwitchTo(oldCxt);
}
/* 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.
/* 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
/* 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);
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 */
Assert(parallel_scan);
- btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+ btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
parallel_scan->ps_offset);
/*
return false;
}
- btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+ btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
parallel_scan->ps_offset);
while (1)
Assert(BlockNumberIsValid(next_scan_page));
- btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+ btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
parallel_scan->ps_offset);
SpinLockAcquire(&btscan->btps_mutex);
if (so->needPrimScan)
return;
- btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+ btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
parallel_scan->ps_offset);
/*
Assert(so->numArrayKeys);
- btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+ btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
parallel_scan->ps_offset);
SpinLockAcquire(&btscan->btps_mutex);
/* 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,
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)
ALLOCSET_DEFAULT_SIZES);
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
- spgistBuildCallback, (void *) &buildstate,
+ spgistBuildCallback, &buildstate,
NULL);
MemoryContextDelete(buildstate.tmpCtx);
UnlockReleaseBuffer(metabuffer);
}
- index->rd_amcache = (void *) cache;
+ index->rd_amcache = cache;
}
else
{
* 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;
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);
}
/* 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;
myextra = (XLogRecPtr *) guc_malloc(ERROR, sizeof(XLogRecPtr));
*myextra = lsn;
- *extra = (void *) myextra;
+ *extra = myextra;
}
return true;
}
myextra = (RecoveryTargetTimeLineGoal *) guc_malloc(ERROR, sizeof(RecoveryTargetTimeLineGoal));
*myextra = rttg;
- *extra = (void *) myextra;
+ *extra = myextra;
return true;
}
myextra = (TransactionId *) guc_malloc(ERROR, sizeof(TransactionId));
*myextra = xid;
- *extra = (void *) myextra;
+ *extra = myextra;
}
return true;
}
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);
}
return expression_tree_walker(node, find_expr_references_walker,
- (void *) context);
+ context);
}
/*
}
else
return expression_tree_walker(node, check_nested_generated_walker,
- (void *) context);
+ context);
}
static void
/* ambulkdelete updates progress metrics */
(void) index_bulk_delete(&ivinfo, NULL,
- validate_index_callback, (void *) &state);
+ validate_index_callback, &state);
/* Execute the sort */
{
(*object_access_hook) (OAT_POST_CREATE,
classId, objectId, subId,
- (void *) &pc_arg);
+ &pc_arg);
}
/*
(*object_access_hook) (OAT_DROP,
classId, objectId, subId,
- (void *) &drop_arg);
+ &drop_arg);
}
/*
(*object_access_hook) (OAT_POST_ALTER,
classId, objectId, subId,
- (void *) &pa_arg);
+ &pa_arg);
}
/*
(*object_access_hook) (OAT_NAMESPACE_SEARCH,
NamespaceRelationId, objectId, 0,
- (void *) &ns_arg);
+ &ns_arg);
return ns_arg.result;
}
(*object_access_hook_str) (OAT_POST_CREATE,
classId, objectName, subId,
- (void *) &pc_arg);
+ &pc_arg);
}
/*
(*object_access_hook_str) (OAT_DROP,
classId, objectName, subId,
- (void *) &drop_arg);
+ &drop_arg);
}
/*
(*object_access_hook_str) (OAT_POST_ALTER,
classId, objectName, subId,
- (void *) &pa_arg);
+ &pa_arg);
}
/*
(*object_access_hook_str) (OAT_NAMESPACE_SEARCH,
NamespaceRelationId, objectName, 0,
- (void *) &ns_arg);
+ &ns_arg);
return ns_arg.result;
}
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;
PG_NODE_TREEOID, -1, 0);
funcctx->tuple_desc = BlessTupleDesc(tupdesc);
- funcctx->user_fctx = (void *) table_infos;
+ funcctx->user_fctx = table_infos;
MemoryContextSwitchTo(oldcontext);
}
/* 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;
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;
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;
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);
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);
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
0,
RangeVarCallbackForPolicy,
- (void *) stmt);
+ stmt);
target_table = relation_open(table_id, NoLock);
table_id = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
0,
RangeVarCallbackForPolicy,
- (void *) stmt);
+ stmt);
target_table = relation_open(table_id, NoLock);
}
return expression_tree_walker(node, contain_invalid_rfcolumn_walker,
- (void *) context);
+ context);
}
/*
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)
parser_errposition(pstate, exprLocation(node))));
return expression_tree_walker(node, check_simple_rowfilter_expr_walker,
- (void *) pstate);
+ pstate);
}
/*
relOid = RangeVarGetRelidExtended(rel, lockmode, RVR_MISSING_OK,
RangeVarCallbackForDropRelation,
- (void *) &state);
+ &state);
/* Not there? */
if (!OidIsValid(relOid))
relid = RangeVarGetRelidExtended(stmt->relation, lockmode,
stmt->missing_ok ? RVR_MISSING_OK : 0,
RangeVarCallbackForAlterRelation,
- (void *) stmt);
+ stmt);
if (!OidIsValid(relid))
{
return RangeVarGetRelidExtended(stmt->relation, lockmode,
stmt->missing_ok ? RVR_MISSING_OK : 0,
RangeVarCallbackForAlterRelation,
- (void *) stmt);
+ stmt);
}
/*
relid = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
stmt->missing_ok ? RVR_MISSING_OK : 0,
RangeVarCallbackForAlterRelation,
- (void *) stmt);
+ stmt);
if (!OidIsValid(relid))
{
partIdxId =
RangeVarGetRelidExtended(name, AccessExclusiveLock, 0,
RangeVarCallbackForAttachIndex,
- (void *) &state);
+ &state);
/* Not there? */
if (!OidIsValid(partIdxId))
ereport(ERROR,
return false;
myextra->numSpcs = numSpcs;
memcpy(myextra->tblSpcs, tblSpcs, numSpcs * sizeof(Oid));
- *extra = (void *) myextra;
+ *extra = myextra;
pfree(tblSpcs);
}
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);
{
/* 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",
return false;
myextra[0] = newDateStyle;
myextra[1] = newDateOrder;
- *extra = (void *) myextra;
+ *extra = myextra;
return true;
}
return false;
myextra->roleid = roleid;
myextra->is_superuser = is_superuser;
- *extra = (void *) myextra;
+ *extra = myextra;
return true;
}
return false;
myextra->roleid = roleid;
myextra->is_superuser = is_superuser;
- *extra = (void *) myextra;
+ *extra = myextra;
return true;
}
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);
}
/*
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;
}
}
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;
}
}
state->flags |= EEO_FLAG_DIRECT_THREADED;
#endif /* EEO_USE_COMPUTED_GOTO */
- state->evalfunc_private = (void *) ExecInterpExpr;
+ state->evalfunc_private = ExecInterpExpr;
}
(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;
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;
}
return expression_tree_walker(node, index_expression_changed_walker,
- (void *) allUpdatedCols);
+ allUpdatedCols);
}
/*
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;
}
/*
*/
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
InitFunctionCallInfoData(*fcinfo, &peragg->finalfn,
numFinalArgs,
pertrans->aggCollation,
- (void *) aggstate, NULL);
+ (Node *) aggstate, NULL);
/* Fill in the transition state value */
fcinfo->args[0].value =
{
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);
}
/*
&pertrans->transfn,
numTransArgs,
pertrans->aggCollation,
- (void *) aggstate, NULL);
+ (Node *) aggstate, NULL);
/* get info about the state value's datatype */
get_typlenbyval(aggtranstype,
&pertrans->serialfn,
1,
InvalidOid,
- (void *) aggstate, NULL);
+ (Node *) aggstate, NULL);
}
if (OidIsValid(aggdeserialfn))
&pertrans->deserialfn,
2,
InvalidOid,
- (void *) aggstate, NULL);
+ (Node *) aggstate, NULL);
}
/*
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
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;
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;
InitFunctionCallInfoData(fcinfodata.fcinfo, &(peraggstate->finalfn),
numFinalArgs,
perfuncstate->winCollation,
- (void *) winstate, NULL);
+ (Node *) winstate, NULL);
fcinfo->args[0].value =
MakeExpandedObjectReadOnly(peraggstate->transValue,
peraggstate->transValueIsNull,
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;
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;
* ... 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
* ... 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
retval->paramCompile = NULL;
retval->paramCompileArg = NULL;
retval->parserSetup = paramlist_parser_setup;
- retval->parserSetupArg = (void *) retval;
+ retval->parserSetupArg = retval;
retval->paramValuesStr = NULL;
retval->numParams = numParams;
break;
}
- return (void *) result;
+ return result;
}
#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 */
}
/* recurse into children */
- return expression_tree_walker(node, cost_qual_eval_walker,
- (void *) context);
+ return expression_tree_walker(node, cost_qual_eval_walker, context);
}
/*
clauses = generate_implied_equalities_for_column(root,
index->rel,
ec_member_matches_indexcol,
- (void *) &arg,
+ &arg,
index->rel->lateral_referencers);
/*
/* 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);
}
/*
/* 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);
}
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);
}
/*
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
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);
}
/*
return (Node *) parent_agg;
}
- return expression_tree_mutator(node, convert_combining_aggrefs,
- (void *) context);
+ return expression_tree_mutator(node, convert_combining_aggrefs, 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);
}
/*
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);
}
/*
return expression_tree_mutator(node,
fix_windowagg_condition_expr_mutator,
- (void *) context);
+ 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);
}
*/
return node;
}
- return expression_tree_mutator(node,
- convert_testexpr_mutator,
- (void *) context);
+ return expression_tree_mutator(node, convert_testexpr_mutator, context);
}
/*
(*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);
}
/*
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);
}
/*
return expression_tree_mutator(node,
process_sublinks_mutator,
- (void *) &locContext);
+ &locContext);
}
/*
return false; /* no more to do here */
}
- return expression_tree_walker(node, finalize_primnode,
- (void *) context);
+ return expression_tree_walker(node, finalize_primnode, 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);
}
/*
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);
}
return replace_rte_variables(expr,
context->varno, 0,
pullup_replace_vars_callback,
- (void *) context,
+ context,
context->outer_hasSubLinks);
}
return (Query *) replace_rte_variables((Node *) query,
context->varno, 1,
pullup_replace_vars_callback,
- (void *) context,
+ context,
NULL);
}
context->sublevels_up++;
result = query_tree_walker((Query *) node,
find_dependent_phvs_walker,
- (void *) context, 0);
+ context, 0);
context->sublevels_up--;
return result;
}
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
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;
}
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;
}
context->sublevels_up++;
result = query_tree_walker((Query *) node,
substitute_phv_relids_walker,
- (void *) context, 0);
+ context, 0);
context->sublevels_up--;
return result;
}
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
*/
query_or_expression_tree_walker(node,
substitute_phv_relids_walker,
- (void *) &context,
+ &context,
0);
}
phv = (PlaceHolderVar *) expression_tree_mutator(node,
adjust_appendrel_attrs_mutator,
- (void *) context);
+ context);
/* now fix PlaceHolderVar's relid sets */
if (phv->phlevelsup == 0)
{
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);
}
/*
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);
}
*flags |= CCDN_CASETESTEXPR_OK;
res = expression_tree_walker(node,
contain_context_dependent_node_walker,
- (void *) flags);
+ flags);
*flags = save_flags;
return res;
}
return res;
}
return expression_tree_walker(node, contain_context_dependent_node_walker,
- (void *) flags);
+ flags);
}
/*****************************************************************************
*/
#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.
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,
*/
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
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;
}
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;
/* 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);
}
/*
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;
context->sublevels_up++;
result = (Node *) query_tree_mutator((Query *) node,
substitute_actual_srf_parameters_mutator,
- (void *) context,
+ context,
0);
context->sublevels_up--;
return result;
}
return expression_tree_mutator(node,
substitute_actual_srf_parameters_mutator,
- (void *) context);
+ 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);
}
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 *
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;
}
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);
}
/*
/* 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);
/* 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;
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;
* 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);
}
/*
*/
query_or_expression_tree_walker(node,
pull_varnos_walker,
- (void *) &context,
+ &context,
0);
return context.varnos;
*/
query_or_expression_tree_walker(node,
pull_varnos_walker,
- (void *) &context,
+ &context,
0);
return context.varnos;
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);
}
/* 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);
}
*/
query_or_expression_tree_walker(node,
pull_vars_walker,
- (void *) &context,
+ &context,
0);
return context.vars;
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);
}
return query_or_expression_tree_walker(node,
contain_vars_of_level_walker,
- (void *) &sublevels_up,
+ &sublevels_up,
0);
}
(*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);
}
(void) query_or_expression_tree_walker(node,
locate_var_of_level_walker,
- (void *) &context,
+ &context,
0);
return context.var_location;
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);
}
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);
}
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)
{
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;
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);
}
/*
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;
}
return expression_tree_mutator(node, flatten_group_exprs_mutator,
- (void *) context);
+ context);
}
/*
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);
context->sublevels_up++;
result = query_tree_walker((Query *) node,
check_agg_arguments_walker,
- (void *) context,
+ context,
0);
context->sublevels_up--;
return result;
return expression_tree_walker(node,
check_agg_arguments_walker,
- (void *) context);
+ context);
}
/*
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);
}
/*
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);
}
/*
*/
(void) query_tree_walker(query,
assign_query_collations_walker,
- (void *) pstate,
+ pstate,
QTW_IGNORE_RANGE_TABLE |
QTW_IGNORE_CTE_SUBQUERIES);
}
(void) expression_tree_walker(node,
assign_collations_walker,
- (void *) &loccontext);
+ &loccontext);
collation = expr->collOid;
Assert(OidIsValid(collation));
/* ... but first, recurse */
(void) expression_tree_walker(node,
assign_collations_walker,
- (void *) &loccontext);
+ &loccontext);
if (OidIsValid(expr->resultcollid))
{
/* ... but first, recurse */
(void) expression_tree_walker(node,
assign_collations_walker,
- (void *) &loccontext);
+ &loccontext);
if (OidIsValid(typcollation))
{
case T_TargetEntry:
(void) expression_tree_walker(node,
assign_collations_walker,
- (void *) &loccontext);
+ &loccontext);
/*
* TargetEntry can have only one child, and should bubble that
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
case T_List:
(void) expression_tree_walker(node,
assign_collations_walker,
- (void *) &loccontext);
+ &loccontext);
/*
* When processing a list, collation state just bubbles up from
*/
(void) expression_tree_walker(node,
assign_collations_walker,
- (void *) &loccontext);
+ &loccontext);
break;
}
}
(void) raw_expression_tree_walker(node,
makeDependencyGraphWalker,
- (void *) cstate);
+ cstate);
cstate->innerwiths = list_delete_first(cstate->innerwiths);
}
else
}
(void) raw_expression_tree_walker(node,
makeDependencyGraphWalker,
- (void *) cstate);
+ cstate);
cstate->innerwiths = list_delete_first(cstate->innerwiths);
}
/* We're done examining the SelectStmt */
}
return raw_expression_tree_walker(node,
makeDependencyGraphWalker,
- (void *) cstate);
+ cstate);
}
/*
}
return raw_expression_tree_walker(node,
checkWellFormedRecursionWalker,
- (void *) cstate);
+ cstate);
}
/*
/* just recurse without changing state */
raw_expression_tree_walker((Node *) stmt,
checkWellFormedRecursionWalker,
- (void *) cstate);
+ cstate);
}
else
{
case SETOP_UNION:
raw_expression_tree_walker((Node *) stmt,
checkWellFormedRecursionWalker,
- (void *) cstate);
+ cstate);
break;
case SETOP_INTERSECT:
if (stmt->all)
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;
}
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 */
}
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;
}
if (*parstate->numParams > 0)
(void) query_tree_walker(query,
check_parameter_resolution_walker,
- (void *) pstate, 0);
+ pstate, 0);
}
/*
/* 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);
}
/*
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;
}
*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);
}
/*
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));
}
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)
{
break;
}
- if (oldhdr && shmdt((void *) oldhdr) < 0)
+ if (oldhdr && shmdt(oldhdr) < 0)
elog(LOG, "shmdt(%p) failed: %m", oldhdr);
}
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
ptr += strlen(slot_name) + 1;
}
- *extra = (void *) config;
+ *extra = config;
pfree(rawname);
list_free(elemlist);
return false;
memcpy(pconf, syncrep_parse_result, syncrep_parse_result->config_size);
- *extra = (void *) pconf;
+ *extra = pconf;
/*
* We need not explicitly clean up syncrep_parse_result. It, and any
return false;
}
return expression_tree_walker(node, setRuleCheckAsUser_walker,
- (void *) context);
+ context);
}
static void
/* If there are sublinks, search for them and process their RTEs */
if (qry->hasSubLinks)
- query_tree_walker(qry, setRuleCheckAsUser_walker, (void *) &userid,
+ query_tree_walker(qry, setRuleCheckAsUser_walker, &userid,
QTW_IGNORE_RC_SUBQUERIES);
}
* Do NOT recurse into Query nodes, because fireRIRrules already processed
* subselects of subselects for us.
*/
- return expression_tree_walker(node, fireRIRonSubLink,
- (void *) context);
+ return expression_tree_walker(node, fireRIRonSubLink, context);
}
context.activeRIRs = activeRIRs;
context.hasRowSecurity = false;
- query_tree_walker(parsetree, fireRIRonSubLink, (void *) &context,
+ query_tree_walker(parsetree, fireRIRonSubLink, &context,
QTW_IGNORE_RC_SUBQUERIES);
/*
fire_context.hasRowSecurity = false;
expression_tree_walker((Node *) securityQuals,
- fireRIRonSubLink, (void *) &fire_context);
+ fireRIRonSubLink, &fire_context);
expression_tree_walker((Node *) withCheckOptions,
- fireRIRonSubLink, (void *) &fire_context);
+ fireRIRonSubLink, &fire_context);
/*
* We can ignore the value of fire_context.hasRowSecurity
*/
return query_or_expression_tree_walker(node,
contain_aggs_of_level_walker,
- (void *) &context,
+ &context,
0);
}
context->sublevels_up++;
result = query_tree_walker((Query *) node,
contain_aggs_of_level_walker,
- (void *) context, 0);
+ context, 0);
context->sublevels_up--;
return result;
}
return expression_tree_walker(node, contain_aggs_of_level_walker,
- (void *) context);
+ context);
}
/*
*/
(void) query_or_expression_tree_walker(node,
locate_agg_of_level_walker,
- (void *) &context,
+ &context,
0);
return context.agg_location;
context->sublevels_up++;
result = query_tree_walker((Query *) node,
locate_agg_of_level_walker,
- (void *) context, 0);
+ context, 0);
context->sublevels_up--;
return result;
}
- return expression_tree_walker(node, locate_agg_of_level_walker,
- (void *) context);
+ return expression_tree_walker(node, locate_agg_of_level_walker, context);
}
/*
if (IsA(node, WindowFunc))
return true; /* abort the tree traversal and return true */
/* Mustn't recurse into subselects */
- return expression_tree_walker(node, contain_windowfuncs_walker,
- (void *) context);
+ return expression_tree_walker(node, contain_windowfuncs_walker, context);
}
/*
*/
(void) query_or_expression_tree_walker(node,
locate_windowfunc_walker,
- (void *) &context,
+ &context,
0);
return context.win_location;
/* else fall through to examine argument */
}
/* Mustn't recurse into subselects */
- return expression_tree_walker(node, locate_windowfunc_walker,
- (void *) context);
+ return expression_tree_walker(node, locate_windowfunc_walker, context);
}
/*
context->sublevels_up++;
result = query_tree_walker((Query *) node, OffsetVarNodes_walker,
- (void *) context, 0);
+ context, 0);
context->sublevels_up--;
return result;
}
- return expression_tree_walker(node, OffsetVarNodes_walker,
- (void *) context);
+ return expression_tree_walker(node, OffsetVarNodes_walker, context);
}
void
rc->rti += offset;
}
}
- query_tree_walker(qry, OffsetVarNodes_walker,
- (void *) &context, 0);
+ query_tree_walker(qry, OffsetVarNodes_walker, &context, 0);
}
else
OffsetVarNodes_walker(node, &context);
context->sublevels_up++;
result = query_tree_walker((Query *) node, ChangeVarNodes_walker,
- (void *) context, 0);
+ context, 0);
context->sublevels_up--;
return result;
}
- return expression_tree_walker(node, ChangeVarNodes_walker,
- (void *) context);
+ return expression_tree_walker(node, ChangeVarNodes_walker, context);
}
void
rc->rti = new_index;
}
}
- query_tree_walker(qry, ChangeVarNodes_walker,
- (void *) &context, 0);
+ query_tree_walker(qry, ChangeVarNodes_walker, &context, 0);
}
else
ChangeVarNodes_walker(node, &context);
context->min_sublevels_up++;
result = query_tree_walker((Query *) node,
IncrementVarSublevelsUp_walker,
- (void *) context,
+ context,
QTW_EXAMINE_RTES_BEFORE);
context->min_sublevels_up--;
return result;
}
- return expression_tree_walker(node, IncrementVarSublevelsUp_walker,
- (void *) context);
+ return expression_tree_walker(node, IncrementVarSublevelsUp_walker, context);
}
void
*/
query_or_expression_tree_walker(node,
IncrementVarSublevelsUp_walker,
- (void *) &context,
+ &context,
QTW_EXAMINE_RTES_BEFORE);
}
range_table_walker(rtable,
IncrementVarSublevelsUp_walker,
- (void *) &context,
+ &context,
QTW_EXAMINE_RTES_BEFORE);
}
context->sublevels_up++;
result = query_tree_walker((Query *) node, rangeTableEntry_used_walker,
- (void *) context, 0);
+ context, 0);
context->sublevels_up--;
return result;
}
- return expression_tree_walker(node, rangeTableEntry_used_walker,
- (void *) context);
+ return expression_tree_walker(node, rangeTableEntry_used_walker, context);
}
bool
*/
return query_or_expression_tree_walker(node,
rangeTableEntry_used_walker,
- (void *) &context,
+ &context,
0);
}
context->sublevels_up++;
newnode = query_tree_mutator((Query *) node,
add_nulling_relids_mutator,
- (void *) context,
+ context,
0);
context->sublevels_up--;
return (Node *) newnode;
}
- return expression_tree_mutator(node, add_nulling_relids_mutator,
- (void *) context);
+ return expression_tree_mutator(node, add_nulling_relids_mutator, context);
}
/*
phv = (PlaceHolderVar *)
expression_tree_mutator(node,
remove_nulling_relids_mutator,
- (void *) context);
+ context);
/* ... and replace the copy's phnullingrels field */
phv->phnullingrels = bms_difference(phv->phnullingrels,
context->removable_relids);
context->sublevels_up++;
newnode = query_tree_mutator((Query *) node,
remove_nulling_relids_mutator,
- (void *) context,
+ context,
0);
context->sublevels_up--;
return (Node *) newnode;
}
- return expression_tree_mutator(node, remove_nulling_relids_mutator,
- (void *) context);
+ return expression_tree_mutator(node, remove_nulling_relids_mutator, context);
}
*/
result = query_or_expression_tree_mutator(node,
replace_rte_variables_mutator,
- (void *) &context,
+ &context,
0);
if (context.inserted_sublink)
context->inserted_sublink = ((Query *) node)->hasSubLinks;
newnode = query_tree_mutator((Query *) node,
replace_rte_variables_mutator,
- (void *) context,
+ context,
0);
newnode->hasSubLinks |= context->inserted_sublink;
context->inserted_sublink = save_inserted_sublink;
context->sublevels_up--;
return (Node *) newnode;
}
- return expression_tree_mutator(node, replace_rte_variables_mutator,
- (void *) context);
+ return expression_tree_mutator(node, replace_rte_variables_mutator, context);
}
context->sublevels_up++;
newnode = query_tree_mutator((Query *) node,
map_variable_attnos_mutator,
- (void *) context,
+ context,
0);
context->sublevels_up--;
return (Node *) newnode;
}
- return expression_tree_mutator(node, map_variable_attnos_mutator,
- (void *) context);
+ return expression_tree_mutator(node, map_variable_attnos_mutator, context);
}
Node *
*/
return query_or_expression_tree_mutator(node,
map_variable_attnos_mutator,
- (void *) &context,
+ &context,
0);
}
return replace_rte_variables(node, target_varno, sublevels_up,
ReplaceVarsFromTargetList_callback,
- (void *) &context,
+ &context,
outer_hasSubLinks);
}
uint32
BufTableHashCode(BufferTag *tagPtr)
{
- return get_hash_value(SharedBufHash, (void *) tagPtr);
+ return get_hash_value(SharedBufHash, tagPtr);
}
/*
/* Setup error traceback support for ereport() */
errcallback.callback = shared_buffer_write_error_callback;
- errcallback.arg = (void *) buf;
+ errcallback.arg = buf;
errcallback.previous = error_context_stack;
error_context_stack = &errcallback;
/* Setup error traceback support for ereport() */
errcallback.callback = local_buffer_write_error_callback;
- errcallback.arg = (void *) bufHdr;
+ errcallback.arg = bufHdr;
errcallback.previous = error_context_stack;
error_context_stack = &errcallback;
newFree = newStart + size;
if (newFree <= ShmemSegHdr->totalsize)
{
- newSpace = (void *) ((char *) ShmemBase + newStart);
+ newSpace = (char *) ShmemBase + newStart;
ShmemSegHdr->freeoffset = newFree;
}
else
size)));
ShmemSegHdr->freeoffset = newFree;
- newSpace = (void *) ((char *) ShmemBase + newStart);
+ newSpace = (char *) ShmemBase + newStart;
Assert(newSpace == (void *) MAXALIGN(newSpace));
one_param_data.paramval = NULL;
params_errcxt.previous = error_context_stack;
params_errcxt.callback = bind_param_error_callback;
- params_errcxt.arg = (void *) &one_param_data;
+ params_errcxt.arg = &one_param_data;
error_context_stack = ¶ms_errcxt;
params = makeParamList(numParams);
params_data.params = params;
params_errcxt.previous = error_context_stack;
params_errcxt.callback = ParamsErrorCallback;
- params_errcxt.arg = (void *) ¶ms_data;
+ params_errcxt.arg = ¶ms_data;
error_context_stack = ¶ms_errcxt;
/* Get the result format codes */
params_data.params = portalParams;
params_errcxt.previous = error_context_stack;
params_errcxt.callback = ParamsErrorCallback;
- params_errcxt.arg = (void *) ¶ms_data;
+ params_errcxt.arg = ¶ms_data;
error_context_stack = ¶ms_errcxt;
if (max_rows <= 0)
info = NULL; /* word isn't recognized */
}
- dstate->private_state = (void *) info;
+ dstate->private_state = info;
if (!info)
{
Conf->avail = COMPACT_ALLOC_CHUNK;
}
- result = (void *) Conf->firstfree;
+ result = Conf->firstfree;
Conf->firstfree += size;
Conf->avail -= size;
stp->curline = NULL;
/* Setup error traceback support for ereport() */
stp->cb.callback = tsearch_readline_callback;
- stp->cb.arg = (void *) stp;
+ stp->cb.arg = stp;
stp->cb.previous = error_context_stack;
error_context_stack = &stp->cb;
return true;
cfg = lookup_ts_config_cache(cfgId);
prsobj = lookup_ts_parser_cache(cfg->prsId);
- prsdata = (void *) DatumGetPointer(FunctionCall2(&prsobj->prsstart,
- PointerGetDatum(buf),
- Int32GetDatum(buflen)));
+ prsdata = DatumGetPointer(FunctionCall2(&prsobj->prsstart,
+ PointerGetDatum(buf),
+ Int32GetDatum(buflen)));
LexizeInit(&ldata, cfg);
cfg = lookup_ts_config_cache(cfgId);
prsobj = lookup_ts_parser_cache(cfg->prsId);
- prsdata = (void *) DatumGetPointer(FunctionCall2(&(prsobj->prsstart),
- PointerGetDatum(buf),
- Int32GetDatum(buflen)));
+ prsdata = DatumGetPointer(FunctionCall2(&(prsobj->prsstart),
+ PointerGetDatum(buf),
+ Int32GetDatum(buflen)));
LexizeInit(&ldata, cfg);
/* lextype takes one dummy argument */
st->list = (LexDescr *) DatumGetPointer(OidFunctionCall1(prs->lextypeOid,
(Datum) 0));
- funcctx->user_fctx = (void *) st;
+ funcctx->user_fctx = st;
if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
elog(ERROR, "return type must be a row type");
st->len = 16;
st->list = (LexemeEntry *) palloc(sizeof(LexemeEntry) * st->len);
- prsdata = (void *) DatumGetPointer(FunctionCall2(&prs->prsstart,
- PointerGetDatum(VARDATA_ANY(txt)),
- Int32GetDatum(VARSIZE_ANY_EXHDR(txt))));
+ prsdata = DatumGetPointer(FunctionCall2(&prs->prsstart,
+ PointerGetDatum(VARDATA_ANY(txt)),
+ Int32GetDatum(VARSIZE_ANY_EXHDR(txt))));
while ((type = DatumGetInt32(FunctionCall3(&prs->prstoken,
PointerGetDatum(prsdata),
idx = (int *) palloc(sizeof(int[2]));
idx[0] = 0; /* ACL array item index */
idx[1] = -1; /* privilege type counter */
- funcctx->user_fctx = (void *) idx;
+ funcctx->user_fctx = idx;
MemoryContextSwitchTo(oldcontext);
}
&typisvarlena);
fmgr_info_cxt(typsend, &iodata->typsend,
fcinfo->flinfo->fn_mcxt);
- fcinfo->flinfo->fn_extra = (void *) iodata;
+ fcinfo->flinfo->fn_extra = iodata;
}
for (i = 0; i < state->nelems; i++)
&iodata->typioparam);
fmgr_info_cxt(typreceive, &iodata->typreceive,
fcinfo->flinfo->fn_mcxt);
- fcinfo->flinfo->fn_extra = (void *) iodata;
+ fcinfo->flinfo->fn_extra = iodata;
}
for (int i = 0; i < nelems; i++)
if (typentry == NULL || typentry->type_id != elmtyp)
{
typentry = lookup_type_cache(elmtyp, 0);
- fcinfo->flinfo->fn_extra = (void *) typentry;
+ fcinfo->flinfo->fn_extra = typentry;
}
result = array_shuffle_n(array, ARR_DIMS(array)[0], true, elmtyp, typentry);
if (typentry == NULL || typentry->type_id != elmtyp)
{
typentry = lookup_type_cache(elmtyp, 0);
- fcinfo->flinfo->fn_extra = (void *) typentry;
+ fcinfo->flinfo->fn_extra = typentry;
}
result = array_shuffle_n(array, n, false, elmtyp, typentry);
(errcode(ERRCODE_UNDEFINED_FUNCTION),
errmsg("could not identify an equality operator for type %s",
format_type_be(element_type))));
- fcinfo->flinfo->fn_extra = (void *) typentry;
+ fcinfo->flinfo->fn_extra = typentry;
}
typlen = typentry->typlen;
typbyval = typentry->typbyval;
(errcode(ERRCODE_UNDEFINED_FUNCTION),
errmsg("could not identify a comparison function for type %s",
format_type_be(element_type))));
- fcinfo->flinfo->fn_extra = (void *) typentry;
+ fcinfo->flinfo->fn_extra = typentry;
}
typlen = typentry->typlen;
typbyval = typentry->typbyval;
typentry = record_typentry;
}
- fcinfo->flinfo->fn_extra = (void *) typentry;
+ fcinfo->flinfo->fn_extra = typentry;
}
typlen = typentry->typlen;
(errcode(ERRCODE_UNDEFINED_FUNCTION),
errmsg("could not identify an extended hash function for type %s",
format_type_be(element_type))));
- fcinfo->flinfo->fn_extra = (void *) typentry;
+ fcinfo->flinfo->fn_extra = typentry;
}
typlen = typentry->typlen;
typbyval = typentry->typbyval;
(errcode(ERRCODE_UNDEFINED_FUNCTION),
errmsg("could not identify an equality operator for type %s",
format_type_be(element_type))));
- *fn_extra = (void *) typentry;
+ *fn_extra = typentry;
}
typlen = typentry->typlen;
typbyval = typentry->typbyval;
(errcode(ERRCODE_UNDEFINED_FUNCTION),
errmsg("could not identify an equality operator for type %s",
format_type_be(element_type))));
- fcinfo->flinfo->fn_extra = (void *) typentry;
+ fcinfo->flinfo->fn_extra = typentry;
}
typlen = typentry->typlen;
typbyval = typentry->typbyval;
(errcode(ERRCODE_UNDEFINED_FUNCTION),
errmsg("could not identify a comparison function for type %s",
format_type_be(element_type))));
- fcinfo->flinfo->fn_extra = (void *) typentry;
+ fcinfo->flinfo->fn_extra = typentry;
}
/*
/* allocate memory for user context */
pindex = (int *) palloc(sizeof(int));
*pindex = 0;
- funcctx->user_fctx = (void *) pindex;
+ funcctx->user_fctx = pindex;
if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
elog(ERROR, "return type must be a row type");
resultsize = EOH_get_flat_size(eoh);
resultptr = (char *) palloc(resultsize);
- EOH_flatten_into(eoh, (void *) resultptr, resultsize);
+ EOH_flatten_into(eoh, resultptr, resultsize);
res = PointerGetDatum(resultptr);
}
else
* so we can't store directly to *start_address.
*/
tmp = (char *) palloc(header);
- EOH_flatten_into(eoh, (void *) tmp, header);
+ EOH_flatten_into(eoh, tmp, header);
memcpy(*start_address, tmp, header);
*start_address += header;
{
my_extra = domain_state_setup(domainType, false,
fcinfo->flinfo->fn_mcxt);
- fcinfo->flinfo->fn_extra = (void *) my_extra;
+ fcinfo->flinfo->fn_extra = my_extra;
}
/*
{
my_extra = domain_state_setup(domainType, true,
fcinfo->flinfo->fn_mcxt);
- fcinfo->flinfo->fn_extra = (void *) my_extra;
+ fcinfo->flinfo->fn_extra = my_extra;
}
/*
{
my_extra = domain_state_setup(domainType, true, mcxt);
if (extra)
- *extra = (void *) my_extra;
+ *extra = my_extra;
}
/*
ReleaseSysCache(enum_tup);
/* Now locate and remember the typcache entry */
tcache = lookup_type_cache(typeoid, 0);
- fcinfo->flinfo->fn_extra = (void *) tcache;
+ fcinfo->flinfo->fn_extra = tcache;
}
/* The remaining comparison logic is in typcache.c */
{
/* Register callback to release the refcount */
erh->er_mcb.func = ER_mc_callback;
- erh->er_mcb.arg = (void *) erh;
+ erh->er_mcb.arg = erh;
MemoryContextRegisterResetCallback(erh->hdr.eoh_context,
&erh->er_mcb);
{
/* Register callback to release the refcount */
erh->er_mcb.func = ER_mc_callback;
- erh->er_mcb.arg = (void *) erh;
+ erh->er_mcb.arg = erh;
MemoryContextRegisterResetCallback(erh->hdr.eoh_context,
&erh->er_mcb);
{
/* Register callback to release the refcount */
erh->er_mcb.func = ER_mc_callback;
- erh->er_mcb.arg = (void *) erh;
+ erh->er_mcb.arg = erh;
MemoryContextRegisterResetCallback(erh->hdr.eoh_context,
&erh->er_mcb);
if (erh->er_mcb.arg == NULL)
{
erh->er_mcb.func = ER_mc_callback;
- erh->er_mcb.arg = (void *) erh;
+ erh->er_mcb.arg = erh;
MemoryContextRegisterResetCallback(erh->hdr.eoh_context,
&erh->er_mcb);
}
state.unique_keys = unique_keys;
state.escontext = escontext;
- sem.semstate = (void *) &state;
+ sem.semstate = &state;
sem.object_start = jsonb_in_object_start;
sem.array_start = jsonb_in_array_start;
memset(&sem, 0, sizeof(sem));
- sem.semstate = (void *) result;
+ sem.semstate = result;
sem.object_start = jsonb_in_object_start;
sem.array_start = jsonb_in_array_start;
}
MemoryContextSwitchTo(oldcontext);
- funcctx->user_fctx = (void *) state;
+ funcctx->user_fctx = state;
}
funcctx = SRF_PERCALL_SETUP();
state->sent_count = 0;
state->result = palloc(256 * sizeof(char *));
- sem->semstate = (void *) state;
+ sem->semstate = state;
sem->array_start = okeys_array_start;
sem->scalar = okeys_scalar;
sem->object_field_start = okeys_object_field_start;
pfree(sem);
MemoryContextSwitchTo(oldcontext);
- funcctx->user_fctx = (void *) state;
+ funcctx->user_fctx = state;
}
funcctx = SRF_PERCALL_SETUP();
if (npath > 0)
state->pathok[0] = true;
- sem->semstate = (void *) state;
+ sem->semstate = state;
/*
* Not all variants need all the semantic routines. Only set the ones that
#endif
sem = palloc0(sizeof(JsonSemAction));
- sem->semstate = (void *) state;
+ sem->semstate = state;
sem->object_start = alen_object_start;
sem->scalar = alen_scalar;
sem->array_element_start = alen_array_element_start;
state->tuple_store = rsi->setResult;
state->ret_tdesc = rsi->setDesc;
- sem->semstate = (void *) state;
+ sem->semstate = state;
sem->array_start = each_array_start;
sem->scalar = each_scalar;
sem->object_field_start = each_object_field_start;
state->tuple_store = rsi->setResult;
state->ret_tdesc = rsi->setDesc;
- sem->semstate = (void *) state;
+ sem->semstate = state;
sem->object_start = elements_object_start;
sem->scalar = elements_scalar;
sem->array_element_start = elements_array_element_start;
state.ctx = ctx;
memset(&sem, 0, sizeof(sem));
- sem.semstate = (void *) &state;
+ sem.semstate = &state;
sem.object_start = populate_array_object_start;
sem.array_end = populate_array_array_end;
sem.array_element_start = populate_array_element_start;
state->lex = makeJsonLexContextCstringLen(NULL, json, len,
GetDatabaseEncoding(), true);
- sem->semstate = (void *) state;
+ sem->semstate = state;
sem->array_start = hash_array_start;
sem->scalar = hash_scalar;
sem->object_field_start = hash_object_field_start;
makeJsonLexContext(&lex, json, true);
- sem->semstate = (void *) state;
+ sem->semstate = state;
sem->array_start = populate_recordset_array_start;
sem->array_element_start = populate_recordset_array_element_start;
sem->scalar = populate_recordset_scalar;
state->strval = makeStringInfo();
state->skip_next_null = false;
- sem->semstate = (void *) state;
+ sem->semstate = state;
sem->object_start = sn_object_start;
sem->object_end = sn_object_end;
sem->array_start = sn_array_start;
state->action_state = action_state;
state->flags = flags;
- sem->semstate = (void *) state;
+ sem->semstate = state;
sem->scalar = iterate_values_scalar;
sem->object_field_start = iterate_values_object_field_start;
state->action = transform_action;
state->action_state = action_state;
- sem->semstate = (void *) state;
+ sem->semstate = state;
sem->object_start = transform_string_values_object_start;
sem->object_end = transform_string_values_object_end;
sem->array_start = transform_string_values_array_start;
if (jb->type == jbvBinary)
{
- JsonbContainer *jbc = (void *) jb->val.binary.data;
+ JsonbContainer *jbc = jb->val.binary.data;
/* Scalars should be always extracted during jsonpath execution. */
Assert(!JsonContainerIsScalar(jbc));
jsonpath_scanner_init(str, len);
- if (jsonpath_yyparse((void *) &parseresult, escontext) != 0)
+ if (jsonpath_yyparse(&parseresult, escontext) != 0)
jsonpath_yyerror(NULL, escontext, "invalid input"); /* shouldn't happen */
jsonpath_scanner_finish();
* out as a result set.
*/
mystatus = (PG_Lock_Status *) palloc(sizeof(PG_Lock_Status));
- funcctx->user_fctx = (void *) mystatus;
+ funcctx->user_fctx = mystatus;
mystatus->lockData = GetLockStatusData();
mystatus->currIdx = 0;
fmgr_info_cxt(typiofunc, &cache->typioproc,
fcinfo->flinfo->fn_mcxt);
- fcinfo->flinfo->fn_extra = (void *) cache;
+ fcinfo->flinfo->fn_extra = cache;
}
return cache;
typcache = lookup_type_cache(mltrngtypid, TYPECACHE_MULTIRANGE_INFO);
if (typcache->rngtype == NULL)
elog(ERROR, "type %u is not a multirange type", mltrngtypid);
- fcinfo->flinfo->fn_extra = (void *) typcache;
+ fcinfo->flinfo->fn_extra = typcache;
}
return typcache;
&qstate->typAlign);
}
- fcinfo->flinfo->fn_extra = (void *) qstate;
+ fcinfo->flinfo->fn_extra = qstate;
MemoryContextSwitchTo(oldcontext);
}
funcctx->tuple_desc = tupdesc;
/* The only state we need is the partition list */
- funcctx->user_fctx = (void *) partitions;
+ funcctx->user_fctx = partitions;
MemoryContextSwitchTo(oldcxt);
}
ancestors = lcons_oid(relid, ancestors);
/* The only state we need is the ancestors list */
- funcctx->user_fctx = (void *) ancestors;
+ funcctx->user_fctx = ancestors;
MemoryContextSwitchTo(oldcxt);
}
fmgr_info_cxt(typiofunc, &cache->typioproc,
fcinfo->flinfo->fn_mcxt);
- fcinfo->flinfo->fn_extra = (void *) cache;
+ fcinfo->flinfo->fn_extra = cache;
}
return cache;
typcache = lookup_type_cache(rngtypid, TYPECACHE_RANGE_INFO);
if (typcache->rngelemtype == NULL)
elog(ERROR, "type %u is not a range type", rngtypid);
- fcinfo->flinfo->fn_extra = (void *) typcache;
+ fcinfo->flinfo->fn_extra = typcache;
}
return typcache;
matchctx->nulls = (bool *) palloc(sizeof(bool) * matchctx->npatterns);
MemoryContextSwitchTo(oldcontext);
- funcctx->user_fctx = (void *) matchctx;
+ funcctx->user_fctx = matchctx;
}
funcctx = SRF_PERCALL_SETUP();
false, true, true);
MemoryContextSwitchTo(oldcontext);
- funcctx->user_fctx = (void *) splitctx;
+ funcctx->user_fctx = splitctx;
}
funcctx = SRF_PERCALL_SETUP();
chkval.arrb = GETARR(key);
chkval.arre = chkval.arrb + ARRNELEM(key);
PG_RETURN_BOOL(TS_execute(GETQUERY(query),
- (void *) &chkval,
+ &chkval,
TS_EXEC_PHRASE_NO_POS,
checkcondition_arr));
}
/* remove duplicates */
while (ptr - res < *size)
{
- if (compareQueryOperand((void *) ptr, (void *) prevptr, (void *) operand) != 0)
+ if (compareQueryOperand(ptr, prevptr, operand) != 0)
{
prevptr++;
*prevptr = *ptr;
{
fillQueryRepresentationData(qr, ptr);
- if (TS_execute(GETQUERY(qr->query), (void *) qr,
+ if (TS_execute(GETQUERY(qr->query), qr,
TS_EXEC_EMPTY, checkcondition_QueryOperand))
{
if (WEP_GETPOS(ptr->pos) > ext->q)
*/
fillQueryRepresentationData(qr, ptr);
- if (TS_execute(GETQUERY(qr->query), (void *) qr,
+ if (TS_execute(GETQUERY(qr->query), qr,
TS_EXEC_EMPTY, checkcondition_QueryOperand))
{
if (WEP_GETPOS(ptr->pos) < ext->p)
MemoryContext oldcontext;
StatEntry *node;
- funcctx->user_fctx = (void *) stat;
+ funcctx->user_fctx = stat;
oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
errcxt->saved_errcxt = xmlGenericErrorContext;
#endif
- xmlSetStructuredErrorFunc((void *) errcxt, xml_errorHandler);
+ xmlSetStructuredErrorFunc(errcxt, xml_errorHandler);
/*
* Verify that xmlSetStructuredErrorFunc set the context variable we
new_errcxt = xmlGenericErrorContext;
#endif
- if (new_errcxt != (void *) errcxt)
+ if (new_errcxt != errcxt)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("could not set up XML error handler"),
cur_errcxt = xmlGenericErrorContext;
#endif
- if (cur_errcxt != (void *) errcxt)
+ if (cur_errcxt != errcxt)
elog(WARNING, "libxml error handling state is out of sync with xml.c");
/* Restore the saved handlers */
xmlGenericErrorFunc errFuncSaved = xmlGenericError;
void *errCtxSaved = xmlGenericErrorContext;
- xmlSetGenericErrorFunc((void *) errorBuf,
+ xmlSetGenericErrorFunc(errorBuf,
(xmlGenericErrorFunc) appendStringInfo);
/* Add context information to errorBuf */
xtCxt = GetXmlTableBuilderPrivateData(state, "XmlTableFetchRow");
/* Propagate our own error context to libxml2 */
- xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler);
+ xmlSetStructuredErrorFunc(xtCxt->xmlerrcxt, xml_errorHandler);
if (xtCxt->xpathobj == NULL)
{
xtCxt->xpathobj->nodesetval != NULL);
/* Propagate our own error context to libxml2 */
- xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler);
+ xmlSetStructuredErrorFunc(xtCxt->xmlerrcxt, xml_errorHandler);
*isnull = false;
xtCxt = GetXmlTableBuilderPrivateData(state, "XmlTableDestroyOpaque");
/* Propagate our own error context to libxml2 */
- xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler);
+ xmlSetStructuredErrorFunc(xtCxt->xmlerrcxt, xml_errorHandler);
if (xtCxt->xpathscomp != NULL)
{
*/
if (parsetree->hasSubLinks)
{
- query_tree_walker(parsetree, ScanQueryWalker,
- (void *) &acquire,
+ query_tree_walker(parsetree, ScanQueryWalker, &acquire,
QTW_IGNORE_RC_SUBQUERIES);
}
}
* Do NOT recurse into Query nodes, because ScanQueryForLocks already
* processed subselects of subselects for us.
*/
- return expression_tree_walker(node, ScanQueryWalker,
- (void *) acquire);
+ return expression_tree_walker(node, ScanQueryWalker, acquire);
}
/*
ref->refctx = refctx;
ref->dcc = NULL;
ref->callback.func = dccref_deletion_callback;
- ref->callback.arg = (void *) ref;
+ ref->callback.arg = ref;
MemoryContextRegisterResetCallback(refctx, &ref->callback);
/* Acquire refcount if there are constraints, and set up exported list */
if (ref->tcache->domainData)
myextra = (int *) guc_malloc(ERROR, sizeof(int));
*myextra = newlogdest;
- *extra = (void *) myextra;
+ *extra = myextra;
return true;
}
{
case HASH_FIND:
if (currBucket != NULL)
- return (void *) ELEMENTKEY(currBucket);
+ return ELEMENTKEY(currBucket);
return NULL;
case HASH_REMOVE:
* element, because someone else is going to reuse it the next
* time something is added to the table
*/
- return (void *) ELEMENTKEY(currBucket);
+ return ELEMENTKEY(currBucket);
}
return NULL;
case HASH_ENTER_NULL:
/* Return existing element if found, else create one */
if (currBucket != NULL)
- return (void *) ELEMENTKEY(currBucket);
+ return ELEMENTKEY(currBucket);
/* disallow inserts if frozen */
if (hashp->frozen)
* caller's data structure.
*/
- return (void *) ELEMENTKEY(currBucket);
+ return ELEMENTKEY(currBucket);
}
elog(ERROR, "unrecognized hash action code: %d", (int) action);
status->curEntry = curElem->link;
if (status->curEntry == NULL) /* end of this bucket */
++status->curBucket;
- return (void *) ELEMENTKEY(curElem);
+ return ELEMENTKEY(curElem);
}
/*
if (status->curEntry == NULL) /* end of this bucket */
++curBucket;
status->curBucket = curBucket;
- return (void *) ELEMENTKEY(curElem);
+ return ELEMENTKEY(curElem);
}
void
/* Examine the context itself */
context->methods->stats(context,
MemoryContextStatsPrint,
- (void *) &level,
+ &level,
totals, print_to_stderr);
/*
/* copy the tuple into sort storage */
tuple = ExecCopySlotMinimalTuple(slot);
- stup.tuple = (void *) tuple;
+ stup.tuple = tuple;
/* set up first-column key value */
htup.t_len = tuple->t_len + MINIMAL_TUPLE_OFFSET;
htup.t_data = (HeapTupleHeader) ((char *) tuple - MINIMAL_TUPLE_OFFSET);
/* copy the tuple into sort storage */
tup = heap_copytuple(tup);
- stup.tuple = (void *) tup;
+ stup.tuple = tup;
/*
* set up first-column key value, and potentially abbreviate, if it's a
LogicalTapeReadExact(tape, tupbody, tupbodylen);
if (base->sortopt & TUPLESORT_RANDOMACCESS) /* need trailing length word? */
LogicalTapeReadExact(tape, &tuplen, sizeof(tuplen));
- stup->tuple = (void *) tuple;
+ stup->tuple = tuple;
/* set up first-column key value */
htup.t_len = tuple->t_len + MINIMAL_TUPLE_OFFSET;
htup.t_data = (HeapTupleHeader) ((char *) tuple - MINIMAL_TUPLE_OFFSET);
LogicalTapeReadExact(tape, tuple->t_data, tuple->t_len);
if (base->sortopt & TUPLESORT_RANDOMACCESS) /* need trailing length word? */
LogicalTapeReadExact(tape, &tuplen, sizeof(tuplen));
- stup->tuple = (void *) tuple;
+ stup->tuple = tuple;
/* set up first-column key value, if it's a simple column */
if (base->haveDatum1)
stup->datum1 = heap_getattr(tuple,
LogicalTapeReadExact(tape, tuple, tuplen);
if (base->sortopt & TUPLESORT_RANDOMACCESS) /* need trailing length word? */
LogicalTapeReadExact(tape, &tuplen, sizeof(tuplen));
- stup->tuple = (void *) tuple;
+ stup->tuple = tuple;
/* set up first-column key value */
stup->datum1 = index_getattr(tuple,
1,
LogicalTapeReadExact(tape, &tuple->tuple, tuplen);
if (base->sortopt & TUPLESORT_RANDOMACCESS) /* need trailing length word? */
LogicalTapeReadExact(tape, &tuplen, sizeof(tuplen));
- stup->tuple = (void *) tuple;
+ stup->tuple = tuple;
/* set up first-column key value, which is block number */
stup->datum1 = tuple->tuple.bt_blkno;
tuple = ExecCopySlotMinimalTuple(slot);
USEMEM(state, GetMemoryChunkSpace(tuple));
- tuplestore_puttuple_common(state, (void *) tuple);
+ tuplestore_puttuple_common(state, tuple);
MemoryContextSwitchTo(oldcxt);
}
*/
tuple = COPYTUP(state, tuple);
- tuplestore_puttuple_common(state, (void *) tuple);
+ tuplestore_puttuple_common(state, tuple);
MemoryContextSwitchTo(oldcxt);
}
tuple = heap_form_minimal_tuple(tdesc, values, isnull);
USEMEM(state, GetMemoryChunkSpace(tuple));
- tuplestore_puttuple_common(state, (void *) tuple);
+ tuplestore_puttuple_common(state, tuple);
MemoryContextSwitchTo(oldcxt);
}
tuple = minimal_tuple_from_heap_tuple((HeapTuple) tup);
USEMEM(state, GetMemoryChunkSpace(tuple));
- return (void *) tuple;
+ return tuple;
}
static void
BufFileReadExact(state->myfile, tupbody, tupbodylen);
if (state->backward) /* need trailing length word? */
BufFileReadExact(state->myfile, &tuplen, sizeof(tuplen));
- return (void *) tuple;
+ return tuple;
}
{
/* First time through (in this process) so allocate the buffer */
AH->lo_buf_size = LOBBUFSIZE;
- AH->lo_buf = (void *) pg_malloc(LOBBUFSIZE);
+ AH->lo_buf = pg_malloc(LOBBUFSIZE);
}
AH->lo_buf_used = 0;
else
{
buf = (char *) pg_malloc(l + 1);
- AH->ReadBufPtr(AH, (void *) buf, l);
+ AH->ReadBufPtr(AH, buf, l);
buf[l] = '\0';
}
/* Set up a private area. */
ctx = (lclContext *) pg_malloc0(sizeof(lclContext));
- AH->formatData = (void *) ctx;
+ AH->formatData = ctx;
/*
* Now open the file
else
ctx->dataState = K_OFFSET_NO_DATA;
- te->formatData = (void *) ctx;
+ te->formatData = ctx;
}
/*
if (ctx == NULL)
{
ctx = (lclTocEntry *) pg_malloc0(sizeof(lclTocEntry));
- te->formatData = (void *) ctx;
+ te->formatData = ctx;
}
ctx->dataState = ReadOffset(AH, &(ctx->dataPos));
/* Set up our private context */
ctx = (lclContext *) pg_malloc0(sizeof(lclContext));
- AH->formatData = (void *) ctx;
+ AH->formatData = ctx;
ctx->dataFH = NULL;
ctx->LOsTocFH = NULL;
else
tctx->filename = NULL;
- te->formatData = (void *) tctx;
+ te->formatData = tctx;
}
/*
if (tctx == NULL)
{
tctx = (lclTocEntry *) pg_malloc0(sizeof(lclTocEntry));
- te->formatData = (void *) tctx;
+ te->formatData = tctx;
}
tctx->filename = ReadStr(AH);
* Set up some special context used in compressing data.
*/
ctx = pg_malloc0_object(lclContext);
- AH->formatData = (void *) ctx;
+ AH->formatData = ctx;
ctx->filePos = 0;
ctx->isSpecialScript = 0;
ctx->hasSeek = checkSeek(ctx->tarFH);
- ctx->FH = (void *) tarOpen(AH, "toc.dat", 'r');
+ ctx->FH = tarOpen(AH, "toc.dat", 'r');
ReadHead(AH);
ReadToc(AH);
tarClose(AH, ctx->FH); /* Nothing else in the file... */
ctx->filename = NULL;
ctx->TH = NULL;
}
- te->formatData = (void *) ctx;
+ te->formatData = ctx;
}
static void
if (ctx == NULL)
{
ctx = pg_malloc0_object(lclTocEntry);
- te->formatData = (void *) ctx;
+ te->formatData = ctx;
}
ctx->filename = ReadStr(AH);
/* Create working state */
scan_state = psql_scan_create(&psqlscan_callbacks);
cond_stack = conditional_stack_create();
- psql_scan_set_passthrough(scan_state, (void *) cond_stack);
+ psql_scan_set_passthrough(scan_state, cond_stack);
query_buf = createPQExpBuffer();
previous_buf = createPQExpBuffer();
cell->val, strlen(cell->val),
pset.encoding, standard_strings());
cond_stack = conditional_stack_create();
- psql_scan_set_passthrough(scan_state, (void *) cond_stack);
+ psql_scan_set_passthrough(scan_state, cond_stack);
successResult = HandleSlashCmds(scan_state,
cond_stack,
* pg_strong_random.c and thence OpenSSL.
*/
#define pg_prng_strong_seed(state) \
- (pg_strong_random((void *) (state), sizeof(pg_prng_state)) ? \
+ (pg_strong_random(state, sizeof(pg_prng_state)) ? \
pg_prng_seed_check(state) : false)
extern uint64 pg_prng_uint64(pg_prng_state *state);
this->autocommit = autocommit;
- PQsetNoticeReceiver(this->connection, &ECPGnoticeReceiver, (void *) this);
+ PQsetNoticeReceiver(this->connection, &ECPGnoticeReceiver, this);
return true;
}
/* allocate storage if needed */
if (arrsize == 0 && *(void **) var == NULL)
{
- void *mem = (void *) ecpg_auto_alloc(offset * ntuples, lineno);
+ void *mem = ecpg_auto_alloc(offset * ntuples, lineno);
if (!mem)
{
/* allocate storage if needed */
if (data_var.ind_arrsize == 0 && data_var.ind_value == NULL)
{
- void *mem = (void *) ecpg_auto_alloc(data_var.ind_offset * ntuples, lineno);
+ void *mem = ecpg_auto_alloc(data_var.ind_offset * ntuples, lineno);
if (!mem)
{
char *
ecpg_auto_alloc(long size, int lineno)
{
- void *ptr = (void *) ecpg_alloc(size, lineno);
+ void *ptr = ecpg_alloc(size, lineno);
if (!ptr)
return NULL;
/*
* Save pointer in FmgrInfo to avoid search on subsequent calls
*/
- fcinfo->flinfo->fn_extra = (void *) function;
+ fcinfo->flinfo->fn_extra = function;
/*
* Finally return the compiled function
pstate->p_post_columnref_hook = plpgsql_post_column_ref;
pstate->p_paramref_hook = plpgsql_param_ref;
/* no need to use p_coerce_param_hook */
- pstate->p_ref_hook_state = (void *) expr;
+ pstate->p_ref_hook_state = expr;
}
/*
resultsize = EOH_get_flat_size(&erh->hdr);
tuphdr = (HeapTupleHeader) SPI_palloc(resultsize);
- EOH_flatten_into(&erh->hdr, (void *) tuphdr, resultsize);
+ EOH_flatten_into(&erh->hdr, tuphdr, resultsize);
HeapTupleHeaderSetTypeId(tuphdr, tupdesc->tdtypeid);
HeapTupleHeaderSetTypMod(tuphdr, tupdesc->tdtypmod);
estate->retval = PointerGetDatum(tuphdr);
/* initialize our ParamListInfo with appropriate hook functions */
estate->paramLI = makeParamList(0);
estate->paramLI->paramFetch = plpgsql_param_fetch;
- estate->paramLI->paramFetchArg = (void *) estate;
+ estate->paramLI->paramFetchArg = estate;
estate->paramLI->paramCompile = plpgsql_param_compile;
estate->paramLI->paramCompileArg = NULL; /* not needed */
estate->paramLI->parserSetup = (ParserSetupHook) plpgsql_parser_setup;
*/
memset(&options, 0, sizeof(options));
options.parserSetup = (ParserSetupHook) plpgsql_parser_setup;
- options.parserSetupArg = (void *) expr;
+ options.parserSetupArg = expr;
options.parseMode = expr->parseMode;
options.cursorOptions = cursorOptions;
plan = SPI_prepare_extended(expr->query, &options);
* possibly setting ecxt_param_list_info to NULL; we've already forced use
* of a generic plan.
*/
- paramLI->parserSetupArg = (void *) expr;
+ paramLI->parserSetupArg = expr;
econtext->ecxt_param_list_info = paramLI;
/*
* Callers must save and restore parserSetupArg if there is any chance
* that they are interrupting an active use of parameters.
*/
- paramLI->parserSetupArg = (void *) expr;
+ paramLI->parserSetupArg = expr;
/*
* Also make sure this is set before parser hooks need it. There is
if (!myextra)
return false;
*myextra = extrachecks;
- *extra = (void *) myextra;
+ *extra = myextra;
return true;
}
sizeof(PLySRFState));
/* Immediately register cleanup callback */
srfstate->callback.func = plpython_srf_cleanup_callback;
- srfstate->callback.arg = (void *) srfstate;
+ srfstate->callback.arg = srfstate;
MemoryContextRegisterResetCallback(funcctx->multi_call_memory_ctx,
&srfstate->callback);
- funcctx->user_fctx = (void *) srfstate;
+ funcctx->user_fctx = srfstate;
}
/* Every call setup */
funcctx = SRF_PERCALL_SETUP();
if (i != 0)
PQsetNoticeProcessor(conns[i].conn,
isotesterNoticeProcessor,
- (void *) &conns[i]);
+ &conns[i]);
else
PQsetNoticeProcessor(conns[i].conn,
blackholeNoticeProcessor,
(matchctx->npatterns + 1));
MemoryContextSwitchTo(oldcontext);
- funcctx->user_fctx = (void *) matchctx;
+ funcctx->user_fctx = matchctx;
/*
* Return the first result row, which is info equivalent to Tcl's