| From: | Kris Jurka <books(at)ejurka(dot)com> |
|---|---|
| To: | Peter Smith <smithp(at)internode(dot)on(dot)net> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: Primary Key Error Updating Rows in ResultSet |
| Date: | 2004-11-30 10:03:01 |
| Message-ID: | Pine.BSO.4.56.0411300500270.3554@leary.csoft.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | mikael-aronsson | 2004-11-30 10:14:17 | Re: Maximum limit on int in plpgsql |
| Previous Message | Kris Jurka | 2004-11-30 09:57:08 | Re: Maximum limit on int in plpgsql |