MoveToInsertRow on a table without a primary key

From: patrick(dot)balleux(at)gmail(dot)com
To: pgsql-jdbc(at)postgresql(dot)org
Subject: MoveToInsertRow on a table without a primary key
Date: 2012-03-14 13:03:36
Message-ID: 1911821.1566.1331730216537.JavaMail.geo-discussion-forums@pbjv6
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello all,

I have a table in a database that does not have a primary key. In the process of migrating data from Oracle to Postgres, I am using ResultSets to populate the Postgres tables.

Basically, all is working well except for tables that do not have a primary key. When I reach the "movetoinsertrow" instruction in my code, the jdbc driver raises an exception about the missing primary key.

The workaround would be to add a temporary primary key to such table, but I want to avoid that. I did the same test with HSQLDB and it works. To me, it seems like a bug.

I googled around for the solution, but found nothing.

Any tips?

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2012-03-14 14:05:38 Re: MoveToInsertRow on a table without a primary key
Previous Message Kris Jurka 2012-03-13 00:39:20 Re: oid int issue with CachedRowSet upgrading from JDBC 8.4 to 9.1