Re: Strange behaviour on function

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: Strange behaviour on function
Дата
Msg-id 2063713102.832030.1688571224669@office.mailbox.org
обсуждение исходный текст
Ответ на Re: Strange behaviour on function  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Strange behaviour on function  (Lorusso Domenico <domenico.l76@gmail.com>)
Список pgsql-general
> On 05/07/2023 17:16 CEST Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>
> https://www.postgresql.org/docs/current/plpgsql-trigger.html
>
> 1)
> "A trigger function must return either NULL or a record/row value having
> exactly the structure of the table the trigger was fired for."
>
> 2) I am not seeing where you use:
>
> "TG_ARGV[]
>
>      Data type array of text; the arguments from the CREATE TRIGGER
> statement. The index counts from 0. Invalid indexes (less than 0 or
> greater than or equal to tg_nargs) result in a null value."
>
> So I don't see how sqlstr is being set?

Domenico did not provide the trigger definition, only function bind_action
which he calls from a trigger function.  Also bind_action cannot be a trigger
function because it does not return trigger.

--
Erik



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Strange behaviour on function
Следующее
От: Lorusso Domenico
Дата:
Сообщение: Re: Strange behaviour on function