Re: Is TG_NARGS/TG_ARGV just legacy, or what?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is TG_NARGS/TG_ARGV just legacy, or what?
Дата
Msg-id 28798.1141523309@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Is TG_NARGS/TG_ARGV just legacy, or what?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> Triggers seem like the least useful place to have variable-argument 
> functions, though.   And it is inconsistent with how we use functions 
> everywhere else, as well as in violation of the SQL03 standard on CREATE 
> FUNCTION (don't know what the standard says about triggers, though).

On what basis do you assert that?

Triggers necessarily have arguments that aren't in the explicit argument
list, namely the state data about the new/old row and so on.  It
wouldn't be productive to try to force all that stuff to be passed as
explicit arguments (and if we did try, we'd make it harder to add more
trigger arguments in future).  The ARGV thing for stuff passed from the
CREATE TRIGGER command is certainly on the crufty side, but it's not
inconsistent with how we pass all the other data to a trigger.  I don't
see an argument for changing this that justifies the compatibility
problems we'd create.
        regards, tom lane


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

Предыдущее
От: Ron Mayer
Дата:
Сообщение: Re: Automatic free space map filling
Следующее
От: "Sergey E. Koposov"
Дата:
Сообщение: Re: Not so happy with psql's new multiline behavior