Commit 29f8f546 authored by Alexander Korotkov's avatar Alexander Korotkov

Fix compiler warning in multirange_constructor0()

Discussion: https://postgr.es/m/X%2BBP8XE0UpIB6Yvh%40paquier.xyz
Author: Michael Paquier
parent 93e8ff87
......@@ -1016,20 +1016,20 @@ multirange_constructor1(PG_FUNCTION_ARGS)
Datum
multirange_constructor0(PG_FUNCTION_ARGS)
{
Oid mltrngtypid = get_fn_expr_rettype(fcinfo->flinfo);
Oid mltrngtypid;
TypeCacheEntry *typcache;
TypeCacheEntry *rangetyp;
/* This should always be called without arguments */
if (PG_NARGS() != 0)
elog(ERROR,
"niladic multirange constructor must not receive arguments");
mltrngtypid = get_fn_expr_rettype(fcinfo->flinfo);
typcache = multirange_get_typcache(fcinfo, mltrngtypid);
rangetyp = typcache->rngtype;
/* We should always be called with no arguments */
if (PG_NARGS() == 0)
PG_RETURN_MULTIRANGE_P(make_multirange(mltrngtypid, rangetyp, 0, NULL));
else
elog(ERROR, /* can't happen */
"niladic multirange constructor must not receive arguments");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment