Getting more than one row in UNIQUE fields

From: Another Trad <anothertrad(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Getting more than one row in UNIQUE fields
Date: 2009-12-04 17:24:49
Message-ID: af7271950912040924y6c5146bet1b043f608a764646@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

My table 'client' has the unique 'client_id'.
My test server, when I try:
select * from client where client_id = 12
My server returns 3 rows!!!!
When I try to update this client, his name for example,using my framework
(SQLAlchemy), obviously returns the error:
"Updated rowcount 3 does not match number of objects updated 1"
But the field client_id is unique and has a sequence to auto increment.

Anyone ever pass to this?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2009-12-04 17:36:54 Re: Getting more than one row in UNIQUE fields
Previous Message Uwe Maiwald 2009-12-04 16:53:34 get sequence name from table name