Re: No Primary Keys (pg7.4.2 on SLES9)

From: Kris Jurka <books(at)ejurka(dot)com>
To: Vidas Makauskas <v(dot)makauskas(at)pzu(dot)lt>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: No Primary Keys (pg7.4.2 on SLES9)
Date: 2006-04-04 21:34:11
Message-ID: Pine.BSO.4.63.0604041624460.13705@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, 3 Apr 2006, Vidas Makauskas wrote:

> I get error NO PRIMARY KEY from prs.moveToInsertRow();
>
> Postgres 7.4.2 on with /usr/share/pgsql/pg73b1jdbc3.jar
>
> Statement st = pg.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
> ResultSet.CONCUR_UPDATABLE);
> st.executeUpdate("CREATE TABLE public.testas (loid integer PRIMARY KEY)
> WITHOUT OIDS");
> ResultSet prs = st.executeQuery("SELECT p.* FROM public.testas p");
> prs.moveToInsertRow();

Older JDBC drivers do not support schema qualified table names for
updatable result sets. Try a newer version:

http://jdbc.postgresql.org/download.html

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2006-04-04 22:33:05 Re: Prepared statement leak
Previous Message Markus Schaber 2006-04-04 16:22:16 Re: psql COPY with JDBC