X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 29272329E43 for ; Tue, 21 Sep 2004 13:30:51 +0100 (BST) 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 95611-06 for ; Tue, 21 Sep 2004 12:30:46 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 48B13329E42 for ; Tue, 21 Sep 2004 13:30:48 +0100 (BST) Received: (qmail 29596 invoked from network); 21 Sep 2004 12:31:08 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 21 Sep 2004 12:31:08 -0000 Subject: Re: Auto-increment serial (Postgresql JDBC driver w/ From: Dave Cramer Reply-To: pg@fastcrypt.com To: Kris Jurka Cc: "Jaroslaw J. Pyszny" , pgsql-jdbc In-Reply-To: References: <1095725344.10857.107.camel@lx.siec> Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1095769996.1550.45.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 21 Sep 2004 08:33:16 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/139 X-Sequence-Number: 11029 Can you pull the sql string out into a final static ? It's never going to change. Also is there a way to do this using the information schema ? Dave On Mon, 2004-09-20 at 21:50, Kris Jurka wrote: > On Mon, 21 Sep 2004, Jaroslaw J. Pyszny wrote: > > > Under OO 'serial' columns don't work, because OO doesn't see > > 'serial' as auto-increment type. I know it's pseuso-type, but > > we can detect it. What do you think, about add this feature > > to driver? > > > > The basic idea looks good to me, but you've made a mistake in the > isAutoIncrement() method. You are using the column number from the > ResultSet to look up the default when you need to actually use that > column's position in the table. In fact it looks like the whole method > body should be moved into the Field class much like the isNullable method > does. This also avoid the contrived hash key value. > > Finally we prefer patches in context diff format (diff -c). > > Kris Jurka > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend -- Dave Cramer 519 939 0336 ICQ # 14675561 www.postgresintl.com