Creating trigger with optional arg?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is it possible to have a variable number of elements in TG_ARGV in a trigger?

Arguments 1-3 are required, and I'd like a NULL check on TG_ARGV[4] as an optional message, so it could be called in one of two ways:

create trigger tg_mytrig after insert on mytable for each row execute procedure my_trigger('opt1', 'opt2', 'opt3');
create trigger tg_mytrig after insert on mytable for each row execute procedure my_trigger('opt1', 'opt2', 'opt3', 'optional opt4');

With some kind of null check on TG_ARGV[4] inside the trigger.

--

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux