Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 4485C1B505EF for ; Wed, 14 Mar 2012 10:13:47 -0300 (ADT) Received: from news.hub.org ([200.46.204.72]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S7o1R-0008No-UT for pgsql-jdbc@postgresql.org; Wed, 14 Mar 2012 13:13:46 +0000 Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id q2EDDWtg039483 for ; Wed, 14 Mar 2012 10:13:32 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id q2ED3bSN031319 for pgsql-jdbc@postgresql.org; Wed, 14 Mar 2012 10:03:37 -0300 (ADT) (envelope-from news) From: patrick.balleux@gmail.com X-Newsgroups: pgsql.interfaces.jdbc Subject: MoveToInsertRow on a table without a primary key Date: Wed, 14 Mar 2012 06:03:36 -0700 (PDT) Organization: http://groups.google.com Lines: 11 Message-ID: <1911821.1566.1331730216537.JavaMail.geo-discussion-forums@pbjv6> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Complaints-To: groups-abuse@google.com Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=24.200.133.149; posting-account=L4tuVwoAAABdXRhXxeWSokvGreywHCCu User-Agent: G2/1.0 To: pgsql-jdbc@postgresql.org X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/27 X-Sequence-Number: 22766 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?