pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRe:
2+ messages / 2 participants
[nested] [flat]
* Re:
@ 2007-01-11 06:42 vasylenko@uksatse.org.ua
2007-01-11 12:33 ` Re: Dave Cramer <pg@fastcrypt.com>
0 siblings, 1 reply; 2+ messages in thread
From: vasylenko@uksatse.org.ua @ 2007-01-11 06:42 UTC (permalink / raw)
To: pgsql-jdbc
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.
I'm going to do in way Andre has recommended and use id field in SELECT
query as Dave has advised.
Thank!
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re:
2007-01-11 06:42 Re: vasylenko@uksatse.org.ua
@ 2007-01-11 12:33 ` Dave Cramer <pg@fastcrypt.com>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Cramer @ 2007-01-11 12:33 UTC (permalink / raw)
To: vasylenko@uksatse.org.ua; +Cc: pgsql-jdbc
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-01-11 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-01-11 06:42 Re: vasylenko@uksatse.org.ua
2007-01-11 12:33 ` Dave Cramer <pg@fastcrypt.com>
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