Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8C7AF9FA164 for ; Thu, 18 Oct 2007 21:09:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 14169-07 for ; Thu, 18 Oct 2007 21:09:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id A04219F95B0 for ; Thu, 18 Oct 2007 21:09:55 -0300 (ADT) Received: from 222-154-138-58.jetstream.xtra.co.nz ([222.154.138.58] helo=[10.1.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1IifQw-0002Ui-M1; Fri, 19 Oct 2007 13:09:46 +1300 Message-ID: <4717F5CD.8070603@opencloud.com> Date: Fri, 19 Oct 2007 13:09:49 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Kris Jurka CC: Andrei Ilitchev , pgsql-jdbc@postgresql.org, Marina Vatkina Subject: Re: Fw: postgresql experts please help References: <001101c81189$2f3f52d0$4c349c0a@ca.oracle.com> <00d601c811b7$47c1a6e0$4c349c0a@ca.oracle.com> <011701c811ca$03cea740$4c349c0a@ca.oracle.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/115 X-Sequence-Number: 17687 Kris Jurka wrote: > Both of these problems are > solved by using pg_get_serial_sequence, which should perhaps be > mentioned more prominently in the documentation. Alternatively if you really do want a particular sequence name rather than letting SERIAL pick one for you, you can use an explicit CREATE SEQUENCE and DEFAULT nextval('whatever') yourself. This is essentially what SERIAL does under the covers anyway. See http://www.postgresql.org/docs/8.2/static/datatype-numeric.html#DATATYPE-SERIAL -O