Re: Why must the function that a trigger calls return

From: Darren Ferguson <darren(at)crystalballinc(dot)com>
To: Greg Patnude <GPatnude(at)adelphia(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Why must the function that a trigger calls return
Date: 2002-09-03 14:56:28
Message-ID: Pine.LNX.4.44.0209031053520.13758-100000@thread.crystalballinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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(at)postgresql(dot)org
>

--
Darren Ferguson

In response to

Browse pgsql-general by date

  From Date Subject
Next Message dima 2002-09-03 15:01:06 Re: Is this an overkill?
Previous Message Tom Lane 2002-09-03 14:35:13 Re: DELETE SQL too slow.

Browse pgsql-sql by date

  From Date Subject
Next Message Yudieg@hotmail.com 2002-09-03 16:19:18 Update help
Previous Message Tom Lane 2002-09-03 13:37:27 Re: convert sum (interval) to seconds