Re: Trigger documentation problem

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Trigger documentation problem
Дата
Msg-id 20011112050330.K74191-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Trigger documentation problem  (Antonio Sergio de Mello e Souza <asergioz@bol.com.br>)
Список pgsql-general
On Mon, 12 Nov 2001, Antonio Sergio de Mello e Souza wrote:

> Hi all,
>
> There's a problem with the documentation for triggers.
> In the CREATE TRIGGER documentation page, the synopsis says:
>
> CREATE TRIGGER name { BEFORE | AFTER } { event [OR ...] }
> ON table FOR EACH { ROW | STATEMENT }
> EXECUTE PROCEDURE func ( arguments )
>
> and one of the examples given is:
>
> CREATE TRIGGER if_dist_exists
> BEFORE INSERT OR UPDATE ON films FOR EACH ROW
> EXECUTE PROCEDURE check_primary_key ('did', 'distributors', 'did');
>
> However, in the section 21.1 TRIGGER CREATION, one can read:
>
> The trigger function must be created before the trigger is created as a
> function taking no arguments and returning opaque.
>
> Also, in the section 24.3 TRIGGER PROCEDURES:
>
> They are created with the usual CREATE FUNCTION command as a function
> with no arguments and a return type of OPAQUE.

That's correct.  Trigger functions take the arguments passed at create
trigger time via a different mechanism that the normal parameter passing
one.  For example in 24.3, there's a mention of TG_ARGV[] and TG_NARGS.



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

Предыдущее
От: Antonio Sergio de Mello e Souza
Дата:
Сообщение: Trigger documentation problem
Следующее
От: "Thomas T. Thai"
Дата:
Сообщение: Re: Storing a tree