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,