Re: Call a Normal function inside a Trigger Function

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: Call a Normal function inside a Trigger Function
Дата
Msg-id 390317034.269615.1681657549620@office.mailbox.org
обсуждение исходный текст
Ответ на Call a Normal function inside a Trigger Function  (FOUTE K. Jaurès <jauresfoute@gmail.com>)
Список pgsql-general
> On 16/04/2023 16:18 CEST FOUTE K. Jaurès <jauresfoute@gmail.com> wrote:
>
> Is it possible to call a function inside a trigger function ?
> Any idea or link are welcome. Thanks in advance

Depends on what you want to do with the return value.  Use PERFORM to ignore
the result. [0]  Use SELECT INTO to handle a single-row result. [1]

    PERFORM myfunc();
    SELECT myfunc() INTO myresult;

[0] https://www.postgresql.org/docs/current/plpgsql-statements.html#PLPGSQL-STATEMENTS-GENERAL-SQL
[1] https://www.postgresql.org/docs/current/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-ONEROW

--
Erik



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

Предыдущее
От:
Дата:
Сообщение: Suppress logging of "pg_hba.conf rejects connection for host"
Следующее
От: Erik Wienhold
Дата:
Сообщение: Re: Suppress logging of "pg_hba.conf rejects connection for host"