X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F3DC6563D5 for ; Wed, 2 Mar 2005 08:13:06 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67576-06 for ; Wed, 2 Mar 2005 08:13:04 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 7F08E5639E for ; Wed, 2 Mar 2005 08:13:04 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j228Cw2x002158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Mar 2005 01:13:00 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j228Cv7p047949; Wed, 2 Mar 2005 01:12:57 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j228CvWt047948; Wed, 2 Mar 2005 01:12:57 -0700 (MST) (envelope-from mfuhr) Date: Wed, 2 Mar 2005 01:12:57 -0700 From: Michael Fuhr To: amrit@health2.moph.go.th Cc: PGsql-performance Subject: Re: What is the postgres sql command for last_user_id ??? Message-ID: <20050302081257.GB47871@winnie.fuhr.org> References: <1109691962.42248e3a3c898@webmail.moph.go.th> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1109691962.42248e3a3c898@webmail.moph.go.th> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/24 X-Sequence-Number: 10729 On Tue, Mar 01, 2005 at 10:46:02PM +0700, amrit@health2.moph.go.th wrote: > I would like to know whether there is any command which the server will give the > record ID back to the client when client puts the data and the server generates > an autoincrement ID for that record. See "How do I get the value of a SERIAL insert?" and the question immediately following it in the FAQ: http://www.postgresql.org/files/documentation/faqs/FAQ.html#4.11.2 -- Michael Fuhr http://www.fuhr.org/~mfuhr/