Received: from fslc.ser.usu.edu (fslc.ser.usu.edu [129.123.28.122]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4BHOMA95953 for ; Fri, 11 May 2001 13:24:22 -0400 (EDT) (envelope-from rmello@fslc.usu.edu) Received: (from rmello@localhost) by fslc.ser.usu.edu (8.12.0.Beta5/8.12.0.Beta5/Debian 8.12.0-1) id f4BHOHBr020539; Fri, 11 May 2001 11:24:17 -0600 Date: Fri, 11 May 2001 11:24:17 -0600 From: Roberto Mello To: Wei Weng Cc: pgsql-sql@postgresql.org Subject: Re: Is this possible? Message-ID: <20010511112417.A20524@cc.usu.edu> References: <9da1vs$13r2$1@news.tht.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.17i In-Reply-To: <9da1vs$13r2$1@news.tht.net>; from wweng@kencast.com on Tue, May 08, 2001 at 09:16:56PM -0400 X-Archive-Number: 200105/101 X-Sequence-Number: 2917 On Tue, May 08, 2001 at 09:16:56PM -0400, Wei Weng wrote: > I have a table that has a serial for primary key. Is it possible to get > the new available primary key right after I insert a row of new entry? Yeah. Se the documentation on triggers. -Roberto -- +----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net http://www.sdl.usu.edu - Space Dynamics Lab, Developer "Data! I thought you were dead!" "No, Sir. I rebooted."