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:
@@ -725,10 +725,9 @@ EnableDisableRule(Relation rel, const char *rulename,
|
||||
/*
|
||||
* Change ev_enabled if it is different from the desired new state.
|
||||
*/
|
||||
if (DatumGetChar(ruleform->ev_enabled) !=
|
||||
fires_when)
|
||||
if (ruleform->ev_enabled != fires_when)
|
||||
{
|
||||
ruleform->ev_enabled = CharGetDatum(fires_when);
|
||||
ruleform->ev_enabled = fires_when;
|
||||
CatalogTupleUpdate(pg_rewrite_desc, &ruletup->t_self, ruletup);
|
||||
|
||||
changed = true;
|
||||
|
||||
Reference in New Issue
Block a user