Creating trigger with optional arg?

Поиск
Список
Период
Сортировка
От Wells Oliver
Тема Creating trigger with optional arg?
Дата
Msg-id CAOC+FBX5WP-ciFA0gd_hvG-AKB4Huopr9xttN6D1MTKR6P6e=Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Creating trigger with optional arg?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-admin
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.

--

В списке pgsql-admin по дате отправления:

Предыдущее
От: jian xu
Дата:
Сообщение: Re: checkpoint process use too much memory
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Creating trigger with optional arg?