Re: trouble with trigger/function???
От | Tom Lane |
---|---|
Тема | Re: trouble with trigger/function??? |
Дата | |
Msg-id | 17605.970583595@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: trouble with trigger/function??? (Nelson Ferreira Jr <nelson@radix.com.br>) |
Список | pgsql-general |
Nelson Ferreira Jr <nelson@radix.com.br> writes: > The return type of the function must be OPAQUE, it means that the NEW > variable is returned (NEW represents the row that is being inserted and so > fired the trigger) Type "OPAQUE" means too many different things at the moment --- in some uses it means "VOID" and in some other ones it means "some type that's not described in pg_type". ON-INSERT trigger functions have to return the tuple to be inserted, and HeapTuple is not a type known to pg_type, so OPAQUE is the right declaration; but it's confusing and error-prone. I've been thinking about proposing a cleanup that would replace OPAQUE with multiple special-purpose pseudo-datatypes, but I'm not sure that improving clarity is worth the price of making everyone change all their trigger function definitions ... regards, tom lane
В списке pgsql-general по дате отправления: