Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A9C1F475C05 for ; Thu, 29 Aug 2002 18:50:56 -0400 (EDT) Received: from wolff.to (wolff.to [66.92.219.49]) by postgresql.org (Postfix) with SMTP id A43864759BD for ; Thu, 29 Aug 2002 18:50:55 -0400 (EDT) Received: (qmail 526 invoked by uid 500); 29 Aug 2002 22:58:15 -0000 Date: Thu, 29 Aug 2002 17:58:15 -0500 From: Bruno Wolff III To: Clinton Adams Cc: Chris Ruprecht , pgsql-php@postgresql.org Subject: Re: How do I get the rec-id from an insert. Message-ID: <20020829225815.GB347@wolff.to> Mail-Followup-To: Clinton Adams , Chris Ruprecht , pgsql-php@postgresql.org References: <200208272340.17513.chris@cdrbill.com> <200208291500.15392.clinton@vote-smart.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200208291500.15392.clinton@vote-smart.org> User-Agent: Mutt/1.3.25i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/108 X-Sequence-Number: 1453 On Thu, Aug 29, 2002 at 15:00:15 -0600, Clinton Adams wrote: > Chris - > > You don't really need to know the key values - make it one query: > > insert into c values (nextval('crecid'), currval('arecid'), currval('brecid')) Is it documented that the above is reliable? I don't remember ever reading that expressions are evaluated in the order they appear in a select statement.