Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 776AD9FB1ED for ; Thu, 11 Jan 2007 08:33:14 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 92419-03 for ; Thu, 11 Jan 2007 08:32:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 7F6E59FA20C for ; Thu, 11 Jan 2007 08:33:05 -0400 (AST) Received: (qmail 26927 invoked from network); 11 Jan 2007 12:33:04 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 11 Jan 2007 12:33:04 -0000 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Date: Thu, 11 Jan 2007 07:33:11 -0500 To: vasylenko@uksatse.org.ua X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/75 X-Sequence-Number: 16440 On 11-Jan-07, at 1:42 AM, vasylenko@uksatse.org.ua wrote: > > > > Dave and Andre, thank for your responses! > > The JDBC driver needs the Primary Key in Select query to identify > the row. > I was mistaken thinking of doing without it, > > ResultSet makes updates in Row executing the > > java.sql.Connection.prepareStatement("UPDATE holidays SET "g_name" > = ? > WHERE "id" = ?") > and executeUpdate() > > when user makes call ResultSet.updateRow() and "id" - the Primary > Key in > database's table. It's logicaly for me now.... > > The same is going on whe users call ResultSet.insertRow(). > The only question presents, why the JDBCDriver developers want to find > PrimaryKey or oid field inside method "moveToInsertRow()"? > I think it mustn't be JDBCDriver problem. > It is the Postrgre server trouble or developers who use JDBCDriver. Can you explain this more, or send a small test case. There should be no reason to get a primary key simply to move to insert row. We do need the primary key in the dataset, but other than that we shouldn't fail on move to insert row ? Dave > > > I'm going to do in way Andre has recommended and use id field in > SELECT > query as Dave has advised. > > Thank! > > > ---------------------------(end of > broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that > your > message can get through to the mailing list cleanly