Their presence causes (small) risks of hiding actual type mismatches
or silently discarding qualifiers. Some have been missed in
7f798aca1d5 and some are new ones along the same lines.
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/aR8Yv%2BuATLKbJCgI%40ip-10-97-1-34.eu-west-3.compute.internal
if (publication->allsequences)
sequences = GetAllPublicationRelations(RELKIND_SEQUENCE, false);
- funcctx->user_fctx = (void *) sequences;
+ funcctx->user_fctx = sequences;
MemoryContextSwitchTo(oldcontext);
}
if (avail > maxread)
avail = maxread;
pq_copymsgbytes(cstate->fe_msgbuf, databuf, avail);
- databuf = (void *) ((char *) databuf + avail);
+ databuf = (char *) databuf + avail;
maxread -= avail;
bytesread += avail;
}
callback_arg.stmt_len = -1;
scripterrcontext.callback = script_error_callback;
- scripterrcontext.arg = (void *) &callback_arg;
+ scripterrcontext.arg = &callback_arg;
scripterrcontext.previous = error_context_stack;
error_context_stack = &scripterrcontext;
/* Setup error traceback support for ereport() */
waiterrcontext.callback = waitonlock_error_callback;
- waiterrcontext.arg = (void *) locallock;
+ waiterrcontext.arg = locallock;
waiterrcontext.previous = error_context_stack;
error_context_stack = &waiterrcontext;
st->len = st->cur;
st->cur = 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");
funcctx->tuple_desc = tupdesc;
else
PrepareToInvalidateCacheTuple(relation, tuple, newtuple,
RegisterCatcacheInvalidation,
- (void *) info);
+ info);
/*
* Now, is this tuple one of the primary definers of a relcache entry? See
elog(ERROR, "could not find library \"%s\" for injection point \"%s\"",
path, entry->name);
- injection_callback_local = (void *)
+ injection_callback_local =
load_external_function(path, entry->function, false, NULL);
if (injection_callback_local == NULL)
#ifdef MEMORY_CONTEXT_CHECKING
chunk = (MemoryChunk *) block->freeptr;
#else
- ptr = (void *) block->freeptr;
+ ptr = block->freeptr;
#endif
/* point the freeptr beyond this chunk */
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;
/* no abbreviations (FIXME maybe use attrnum for this?) */
stup->datum1 = (Datum) 0;