Re: Primary Key Error Updating Rows in ResultSet - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Primary Key Error Updating Rows in ResultSet
Date
Msg-id Pine.BSO.4.56.0411300500270.3554@leary.csoft.net
Whole thread Raw
In response to Primary Key Error Updating Rows in ResultSet  (Peter Smith <smithp@internode.on.net>)
List pgsql-jdbc

On Tue, 30 Nov 2004, Peter Smith wrote:

> On Tue, 2004-11-30 at 16:12, Kris Jurka wrote:
> > It is not enough to have a primary key on the table, you must also select
> > those columns in your ResultSet.  Further, the code to determine the table
> > in question isn't very good and is easily fooled.  What is your exact
> > SELECT statement and primary key definition?
>
> The select statement I'm using is very basic:
>
> select targetcode, target, altcode from targets;
>
> targetcode is the primary key of type CHAR(3).
>

If you have in fact included the trailing semi-colon on the SELECT
statement I believe the driver determines the table name is "targets;"
instead of "targets".  Either leave it off or put some whitespace between
it and the tablename.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Maximum limit on int in plpgsql
Next
From: "mikael-aronsson"
Date:
Subject: Re: Maximum limit on int in plpgsql