Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 31AB0475CA9; Fri, 30 Aug 2002 12:08:48 -0400 (EDT) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 8C116475C77; Fri, 30 Aug 2002 12:08:47 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1629120; Fri, 30 Aug 2002 09:08:51 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: "Greg Patnude" , pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] Why must the function that a trigger calls return "opaque" ??? Date: Thu, 29 Aug 2002 11:05:25 -0700 X-Mailer: KMail [version 1.4] References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200208291105.25725.josh@agliodbs.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/71 X-Sequence-Number: 29652 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=20 returning the new/altered/deleted row. If you want a function to return a value, don't use a trigger. --=20 -Josh Berkus Aglio Database Solutions San Francisco