Discussion:
Need help
(too old to reply)
Chris White (cjwhite)
2004-10-20 18:57:19 UTC
Permalink
I am running 7.4.2 and I am seeing a strange error. I am using jdbc to
update a table with the following statement:

update vm_message set usecount=4 where messsage id='1234567';

this statements generates a PSQLException with the following message:

ERROR: duplicate key violates unique constraint "vm_message_pkey"

I don't understand why I am getting this message because the primary key for
table vm_message is messageid and this is not being changed

Any body have any ideas?

Chris White
Joshua D. Drake
2004-10-20 19:41:56 UTC
Permalink
Post by Chris White (cjwhite)
ERROR: duplicate key violates unique constraint "vm_message_pkey"
I don't understand why I am getting this message because the primary key
for table vm_message is messageid and this is not being changed
Any body have any ideas?
7.4.2 is know to have index issues. Try reindexing the primary key and
executing the query again.

Sincerely,

Joshua D. Drake
Post by Chris White (cjwhite)
Chris White
--
Command Prompt, Inc., home of PostgreSQL Replication, and plPHP.
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - ***@commandprompt.com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL
Chris White (cjwhite)
2004-10-20 20:31:37 UTC
Permalink
That doesn't help me because this is running in an embedded system that
should have little or no db admin. Anybody suggest what version I should be
running?

Chris

-----Original Message-----
From: Joshua D. Drake [mailto:***@commandprompt.com]
Sent: Wednesday, October 20, 2004 12:42 PM
To: ***@cisco.com
Cc: pgsql-***@postgresql.org
Subject: Re: [ADMIN] Need help
Post by Chris White (cjwhite)
ERROR: duplicate key violates unique constraint "vm_message_pkey"
I don't understand why I am getting this message because the primary
key for table vm_message is messageid and this is not being changed
Any body have any ideas?
7.4.2 is know to have index issues. Try reindexing the primary key and
executing the query again.

Sincerely,

Joshua D. Drake
Post by Chris White (cjwhite)
Chris White
--
Command Prompt, Inc., home of PostgreSQL Replication, and plPHP.
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - ***@commandprompt.com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Joshua D. Drake
2004-10-20 20:41:29 UTC
Permalink
Post by Chris White (cjwhite)
That doesn't help me because this is running in an embedded system that
should have little or no db admin. Anybody suggest what version I should be
running?
7.4.5.

Sincerely,

Joshua D. Drake
Post by Chris White (cjwhite)
Chris
-----Original Message-----
Sent: Wednesday, October 20, 2004 12:42 PM
Subject: Re: [ADMIN] Need help
Post by Chris White (cjwhite)
ERROR: duplicate key violates unique constraint "vm_message_pkey"
I don't understand why I am getting this message because the primary
key for table vm_message is messageid and this is not being changed
Any body have any ideas?
7.4.2 is know to have index issues. Try reindexing the primary key and
executing the query again.
Sincerely,
Joshua D. Drake
Post by Chris White (cjwhite)
Chris White
--
Command Prompt, Inc., home of PostgreSQL Replication, and plPHP.
Postgresql support, programming shared hosting and dedicated hosting.
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL
--
Command Prompt, Inc., home of PostgreSQL Replication, and plPHP.
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - ***@commandprompt.com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL
Scott Marlowe
2004-10-20 21:53:23 UTC
Permalink
Post by Chris White (cjwhite)
I am running 7.4.2 and I am seeing a strange error. I am using jdbc to
update vm_message set usecount=4 where messsage id='1234567';
Is that really your query, cut and pasted? Is that space between
message and id supposed to be there? Just wondering.


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Chris White (cjwhite)
2004-10-20 23:09:08 UTC
Permalink
It was a mistype, it was not a cut and paste, as I do not have email on the
system that has access to the system running the DB. There is meant to be no
space in messageid

-----Original Message-----
From: Scott Marlowe [mailto:***@qwest.net]
Sent: Wednesday, October 20, 2004 2:53 PM
To: ***@cisco.com
Cc: pgsql-***@postgresql.org
Subject: Re: [ADMIN] Need help
Post by Chris White (cjwhite)
I am running 7.4.2 and I am seeing a strange error. I am using jdbc to
update vm_message set usecount=4 where messsage id='1234567';
Is that really your query, cut and pasted? Is that space between message
and id supposed to be there? Just wondering.


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Loading...