Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id B5CE42E0060 for ; Fri, 11 Apr 2008 14:23:08 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 22324-01 for ; Fri, 11 Apr 2008 14:23:06 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.231]) by developer.postgresql.org (Postfix) with ESMTP id DE5662E002C for ; Fri, 11 Apr 2008 14:23:05 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id r21so618437wxc.28 for ; Fri, 11 Apr 2008 10:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=9S8ckGbyPpEdcoH9edEwpifMdqgDmFBQ9AhtG87FXQU=; b=SoSKS4t5rELoXhNVldmHtww1bpXDTOp+E3O/nVqEIVWn/AWmjKONai6vhl27kF4fvVLceQ8RjeUHjoAjoXubBJ+lPtZMKwG3VY1HnRQLnKGGdiM3OkXsvkHH32lJeso04WfTmE98n/RD+t53z7Cl1E/6KB6i9aFBzp8S8K7lrUs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=AsEvifE8PF3m2DBZLHB7hyVQNX3sLNhmmONAN5TXY+C7EMr5U79Thav4A+YO6AoivZc/gCb+Ar+2o5n4Gm1NI1H2/PzO0o5bCVKpegSQuOhGPUc5mzW6fNXih66SY/X0Qy8yW7sVLdYvTkP8zvKXmi7jVPTgfzZQOXTAz6zNdnQ= Received: by 10.70.19.7 with SMTP id 7mr3631755wxs.33.1207934584827; Fri, 11 Apr 2008 10:23:04 -0700 (PDT) Received: by 10.70.25.5 with HTTP; Fri, 11 Apr 2008 10:23:04 -0700 (PDT) Message-ID: Date: Fri, 11 Apr 2008 19:23:04 +0200 From: "Nacef LABIDI" To: pgsql-sql@postgresql.org Subject: Get the last inserted id MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10955_20146733.1207934584805" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200804/76 X-Sequence-Number: 30615 ------=_Part_10955_20146733.1207934584805 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, I was wondering if postgres can return the last ID inserted for a table which the primary key is autoincremented. I need to retrieve this ID in my code to continue processing on that inserted row. Thanks to all ------=_Part_10955_20146733.1207934584805 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi all,
 
I was wondering if postgres can return the last ID inserted for a table which the primary key is autoincremented. I need to retrieve this ID in my code to continue processing on that inserted row.
 
Thanks to all
------=_Part_10955_20146733.1207934584805--