Re: [GENERAL] Why must the function that a trigger calls return

Поиск
Список
Период
Сортировка
От Darren Ferguson
Тема Re: [GENERAL] Why must the function that a trigger calls return
Дата
Msg-id Pine.LNX.4.44.0209031053520.13758-100000@thread.crystalballinc.com
обсуждение исходный текст
Ответ на Why must the function that a trigger calls return "opaque" ???  ("Greg Patnude" <GPatnude@adelphia.net>)
Список pgsql-sql
What would the trigger return the value too. You did not call the trigger
the system called the trigger. Also triggers are not meant for use in this
way they are meant for data manipulation before or after a table is
inserted,updated or deleted.

You would have to run select currval('seq_name') as the next query.

On Thu, 29 Aug 2002, Greg Patnude wrote:

> 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 ???
>
> GP
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
Darren Ferguson


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: convert sum (interval) to seconds
Следующее
От: Hubert depesz Lubaczewski
Дата:
Сообщение: tree structures in sql - my point of view (with request of comment from joe celko)