From: Darren Ferguson <darren@crystalballinc.com>
To: Greg Patnude <GPatnude@adelphia.net>
Cc: pgsql-general@postgresql.org, <pgsql-sql@postgresql.org>
Subject: Re: Why must the function that a trigger calls return
Date: Tue, 3 Sep 2002 10:56:28 -0400 (EDT)
Message-ID: <Pine.LNX.4.44.0209031053520.13758-100000@thread.crystalballinc.com> (raw)
In-Reply-To: <akle4r$2nq5$1@news.hub.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: darren@crystalballinc.com, GPatnude@adelphia.net
Subject: Re: Why must the function that a trigger calls return
In-Reply-To: <Pine.LNX.4.44.0209031053520.13758-100000@thread.crystalballinc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox