pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: vasylenko@uksatse.org.ua
Cc: pgsql-jdbc@postgresql.org
Subject: Re:
Date: Thu, 11 Jan 2007 07:33:11 -0500
Message-ID: <D421C922-207D-4F73-BFAC-A61A092A5181@fastcrypt.com> (raw)
In-Reply-To: <OF41BC4C79.AFC9FDE2-ONC2257260.0021E3EA-C2257260.0024D58E@UKCC.UKSATSE>
References: <OF41BC4C79.AFC9FDE2-ONC2257260.0021E3EA-C2257260.0024D58E@UKCC.UKSATSE>


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




view thread (2+ messages)

Message-ID: <D421C922-207D-4F73-BFAC-A61A092A5181@fastcrypt.com>
Permalink:  ../D421C922-207D-4F73-BFAC-A61A092A5181@fastcrypt.com/
Also on:    postgresql.org/message-id/D421C922-207D-4F73-BFAC-A61A092A5181@fastcrypt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg@fastcrypt.com, vasylenko@uksatse.org.ua
  Subject: Re: 
  In-Reply-To: <D421C922-207D-4F73-BFAC-A61A092A5181@fastcrypt.com>
  References: <OF41BC4C79.AFC9FDE2-ONC2257260.0021E3EA-C2257260.0024D58E@UKCC.UKSATSE> <D421C922-207D-4F73-BFAC-A61A092A5181@fastcrypt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox