From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | vasylenko(at)uksatse(dot)org(dot)ua |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: |
Date: | 2007-01-11 12:33:11 |
Message-ID: | D421C922-207D-4F73-BFAC-A61A092A5181@fastcrypt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 11-Jan-07, at 1:42 AM, vasylenko(at)uksatse(dot)org(dot)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(at)postgresql(dot)org so that
> your
> message can get through to the mailing list cleanly
From | Date | Subject | |
---|---|---|---|
Next Message | James Neff | 2007-01-11 14:28:08 | connection pooling for postgres |
Previous Message | Deval kulshrestha | 2007-01-11 11:56:49 | Test db connection to 'jdbc:postgresql://grid-master:5432/arco' ... Failed (1) |