Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 75BC1632F4C for ; Sun, 4 Oct 2009 15:37:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 36874-10 for ; Sun, 4 Oct 2009 18:37:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by mail.postgresql.org (Postfix) with ESMTP id 1C202632CCD for ; Sun, 4 Oct 2009 15:37:42 -0300 (ADT) Received: by bwz27 with SMTP id 27so2010002bwz.19 for ; Sun, 04 Oct 2009 11:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=LOclyp2bkmcJLS+oL/Mh8WfNHVthTP8ms0FjJx26K30=; b=uzMUZBFj6ovogurK7VS4HtWs8G8YQ1BLlWuRBVstam0bt7hlW2G9+85CBeTQYR975h dQHqtgtksJCr3lGZbG5GWmY4ikhCo/F0ycs1U+kuOzqvyhsd4/OTGkeBIRk/hc0T+00w RqKDfYRJoWrzNfhS37IfHPF7CUzbPx01cm/7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=IIPFLmAcxzVgNnTuuGNa20O/A2leb0YeyOItIRuc9WanD2MVxl8TKtuIHI451cFqJz ZfmwVmqAiQ23XW5ZNnyMuqj/0s22f5Gw6lNX02hNP+5R7wITwOxzY2EQYPkupH9Av/t+ OuMgQmX4fsWVzUSRZr+GrF7Acj43HimlkZAhM= MIME-Version: 1.0 Received: by 10.239.141.131 with SMTP id c3mr504177hba.44.1254681460546; Sun, 04 Oct 2009 11:37:40 -0700 (PDT) In-Reply-To: <444951.51198.qm@web33806.mail.mud.yahoo.com> References: <444951.51198.qm@web33806.mail.mud.yahoo.com> Date: Sun, 4 Oct 2009 15:37:40 -0300 Message-ID: <690707f60910041137l340d2873le86d8f3458188471@mail.gmail.com> Subject: Re: reading last inserted record withoud any autoincrement field From: Osvaldo Kussama To: m_qoreishy@yahoo.com Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/21 X-Sequence-Number: 33220 2009/10/4 mohammad qoreishy > > How can get last inserted record in a table without any autoincrement fil= ed? > I need to=A0 frequently fetch the last inserted record. > If I must use the "Cursor" please explain your solution. > RETURNING clause? http://www.postgresql.org/docs/current/interactive/sql-insert.html Osvaldo