Received: from vanilla.ice.mpg.de (IDENT:root@vanilla.ice.mpg.de [195.37.47.220]) by hub.org (8.9.3/8.9.3) with ESMTP id PAA49894 for ; Mon, 13 Sep 1999 15:19:41 -0400 (EDT) (envelope-from steinbeck@ice.mpg.de) Received: from ice.mpg.de (relax.ice.mpg.de [195.37.47.89]) by vanilla.ice.mpg.de (8.8.7/8.8.7) with ESMTP id UAA11743 for ; Mon, 13 Sep 1999 20:24:02 +0200 Message-ID: <37DD4E36.830C04BD@ice.mpg.de> Date: Mon, 13 Sep 1999 21:19:18 +0200 From: Christoph Steinbeck Reply-To: steinbeck@ice.mpg.de Organization: Max-Planck-Institute of Chemical Ecology X-Mailer: Mozilla 4.61 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgreSQL.org Subject: JDBC and getting just assigned serial number References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I'm thrilled to see that there is some kind of discussion running in the C area on the exact equivalent of my very recent JDBC problem. I insert a row into a table where one field is a SERIAL. This SERIAL, of course, is automatically assigned by PostgreSQL. How do I get this number immeadiately after inserting the row? When I issue the command with psql I get back some kind of number which presumably is the OID. Getting just this one would be fine too because I need it for referencing. Any hints are greatly appreciated. TIA and cheers, Chris -- Dr. Christoph Steinbeck (http://www.ice.mpg.de/~stein) MPI of Chemical Ecology, Tatzendpromenade 1a, 07745 Jena, Germany Tel: +49(0)3641 643644 - Mobile: +49(0)177 8236510 - Fax: +49(0)3641 643665 What is man but that lofty spirit - that sense of enterprise. ... Kirk, "I, Mudd," stardate 4513.3..