Re: [SQL] Why must the function that a trigger calls return "opaque" ???

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: [SQL] Why must the function that a trigger calls return "opaque" ???
Дата
Msg-id 200208291105.25725.josh@agliodbs.com
обсуждение исходный текст
Ответ на Why must the function that a trigger calls return "opaque" ???  ("Greg Patnude" <GPatnude@adelphia.net>)
Список pgsql-general
Greg,

> This seem rather limiting...  Suppose I want a trigger that after insert,
> returns the currval(sequence) of the newly inserted row automatically
> without having to run another query ???

Because you can't capture the return value of a trigger.  The trigger is
returning the new/altered/deleted row.

If you want a function to return a value, don't use a trigger.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Предыдущее
От: olga@home-medicine-usa.com (Olga)
Дата:
Сообщение: SET TIME ZONE problem
Следующее
От: gary.beberman@mindspring.com (Gary Beberman)
Дата:
Сообщение: How to uninstall PostgreSQL on OS X