X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 535768B9F90 for ; Thu, 3 Feb 2005 22:53:29 +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 12313-07 for ; Thu, 3 Feb 2005 22:53:19 +0000 (GMT) Received: from happy.onesystem.ca (happy.onesystem.ca [205.206.61.17]) by svr1.postgresql.org (Postfix) with ESMTP id 13E518B9F76 for ; Thu, 3 Feb 2005 22:53:21 +0000 (GMT) Received: from elb_lx.onesystem.ca ([10.1.1.50]) by happy.onesystem.ca with asmtp (Exim 4.14) id 1Cwpqi-0006rq-Os for pgsql-sql@postgresql.org; Thu, 03 Feb 2005 15:53:20 -0700 Message-ID: <4202AB60.90608@onesystem.com> Date: Thu, 03 Feb 2005 15:53:20 -0700 From: Edmund Bacon User-Agent: Mozilla Thunderbird 0.9 (X11/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: getting back autonumber just inserted References: <5d14ecf90410162019443dc355@mail.gmail.com> <4202A2A3.7070707@dri.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/82 X-Sequence-Number: 20193 Perhaps you meant: http://www.postgresql.org/docs/8.0/interactive/functions-info.html#FUNCTIONS-INFO-SCHEMA-TABLE in particular |pg_get_serial_sequence|(table_name, column_name) Sean Davis wrote: > > On Feb 3, 2005, at 5:16 PM, lorid wrote: > >> I could have sworn I kept a copy of prior emails that discussed how >> to get back a value that was just inserted into a autonumber (or in >> postgresql case a sequence number) >> > > See here: > > http://www.postgresql.org/docs/8.0/interactive/functions- > sequence.html#FUNCTIONS-SEQUENCE-TABLE > > Sean > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- Edmund Bacon