mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
Remove useless/superfluous Datum conversions
Remove useless DatumGetFoo() and FooGetDatum() calls. These are places where no conversion from or to Datum was actually happening. We think these extra calls covered here were harmless. Some actual bugs that were discovered during this process have been committed separately (80c758a2e1,2242b26ce4). Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/8246d7ff-f4b7-4363-913e-827dadfeb145%40eisentraut.org
This commit is contained in:
@@ -2815,7 +2815,7 @@ ExecJustHashVarImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
|
||||
*isnull = false;
|
||||
|
||||
if (!fcinfo->args[0].isnull)
|
||||
return DatumGetUInt32(hashop->d.hashdatum.fn_addr(fcinfo));
|
||||
return hashop->d.hashdatum.fn_addr(fcinfo);
|
||||
else
|
||||
return (Datum) 0;
|
||||
}
|
||||
@@ -2849,7 +2849,7 @@ ExecJustHashVarVirtImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
|
||||
*isnull = false;
|
||||
|
||||
if (!fcinfo->args[0].isnull)
|
||||
return DatumGetUInt32(hashop->d.hashdatum.fn_addr(fcinfo));
|
||||
return hashop->d.hashdatum.fn_addr(fcinfo);
|
||||
else
|
||||
return (Datum) 0;
|
||||
}
|
||||
@@ -2892,7 +2892,7 @@ ExecJustHashOuterVarStrict(ExprState *state, ExprContext *econtext,
|
||||
if (!fcinfo->args[0].isnull)
|
||||
{
|
||||
*isnull = false;
|
||||
return DatumGetUInt32(hashop->d.hashdatum.fn_addr(fcinfo));
|
||||
return hashop->d.hashdatum.fn_addr(fcinfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user