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 12514329D20 for ; Tue, 21 Sep 2004 21:28:49 +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 74755-07 for ; Tue, 21 Sep 2004 20:28:45 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 559CD329D4D for ; Tue, 21 Sep 2004 21:28:46 +0100 (BST) Received: (qmail 419 invoked from network); 21 Sep 2004 20:29:05 -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 20:29:05 -0000 Subject: Re: Auto-increment serial (Postgresql JDBC driver w/ From: Dave Cramer Reply-To: pg@fastcrypt.com To: "Jaroslaw J. Pyszny" Cc: Kris Jurka , pgsql-jdbc In-Reply-To: <1095794747.18680.23.camel@lx.siec> References: <1095725344.10857.107.camel@lx.siec> <1095794747.18680.23.camel@lx.siec> Content-Type: text/plain; charset=iso-8859-2 Organization: Cramer Consulting Message-Id: <1095798675.1557.122.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 21 Sep 2004 16:31:15 -0400 Content-Transfer-Encoding: 8bit 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/143 X-Sequence-Number: 11033 This is probably a much more portable way to get the same information. select column_default from information_schema.columns where table_name = 'xyz'; Dave On Tue, 2004-09-21 at 15:25, Jaroslaw J. Pyszny wrote: > W li¶cie z wto, 21-09-2004, godz. 03:50, Kris Jurka pisze: > > On Mon, 21 Sep 2004, Jaroslaw J. Pyszny wrote: > > > > > 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). > Thanks :) > I'll try fix it. > > Jarek -- Dave Cramer 519 939 0336 ICQ # 14675561 www.postgresintl.com