mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Code simplification
Initialize TriggerData to 0 for the whole struct together, instead of each field separately. Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://www.postgresql.org/message-id/flat/11c5f156-67a9-0fb5-8200-2a8018eb2e0c@2ndquadrant.com
This commit is contained in:
@ -10264,7 +10264,7 @@ validateForeignKeyConstraint(char *conname,
|
||||
while (table_scan_getnextslot(scan, ForwardScanDirection, slot))
|
||||
{
|
||||
LOCAL_FCINFO(fcinfo, 0);
|
||||
TriggerData trigdata;
|
||||
TriggerData trigdata = {0};
|
||||
|
||||
CHECK_FOR_INTERRUPTS();
|
||||
|
||||
@ -10283,8 +10283,6 @@ validateForeignKeyConstraint(char *conname,
|
||||
trigdata.tg_relation = rel;
|
||||
trigdata.tg_trigtuple = ExecFetchSlotHeapTuple(slot, false, NULL);
|
||||
trigdata.tg_trigslot = slot;
|
||||
trigdata.tg_newtuple = NULL;
|
||||
trigdata.tg_newslot = NULL;
|
||||
trigdata.tg_trigger = &trig;
|
||||
|
||||
fcinfo->context = (Node *) &trigdata;
|
||||
|
Reference in New Issue
Block a user