From: | <msalais(at)msym(dot)fr> |
---|---|
To: | "'Sajjad Abid'" <abidsajjad(at)gmail(dot)com>, "'Diomedes Dominguez'" <diomedes(dot)dominguez(at)gmail(dot)com> |
Cc: | <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Reg. Postgres Unique contraint |
Date: | 2024-12-27 11:54:52 |
Message-ID: | 004d01db5856$23bde1c0$6b39a540$@msym.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hi,
Does the following query return something:
Select user_name, count(*) from your_table group by user_name having count(*) > 1
Best regards
Michel SALAIS
De : Sajjad Abid <abidsajjad(at)gmail(dot)com>
Envoyé : mercredi 27 novembre 2024 05:28
À : Diomedes Dominguez <diomedes(dot)dominguez(at)gmail(dot)com>
Cc : pgsql-performance(at)lists(dot)postgresql(dot)org
Objet : Re: Reg. Postgres Unique contraint
Version of Postgres is 12.9
On Wed, Nov 27, 2024 at 9:49 AM Diomedes Dominguez <diomedes(dot)dominguez(at)gmail(dot)com <mailto:diomedes(dot)dominguez(at)gmail(dot)com> > wrote:
Which version of Postgres are you using?
El mié, 27 de nov de 2024, 00:14, Sajjad Abid <abidsajjad(at)gmail(dot)com <mailto:abidsajjad(at)gmail(dot)com> > escribió:
A column is character varying(50), also on this column a unique constraint is defined, but I found some duplicate values in this column for some records
user_name character varying(50)
CONSTRAINT user_name_unq UNIQUE ( user_name )
Kindly help me to resolve this issue.
--
Thanks & Regards,
Sajjad Abid
--
Thanks & Regards,
Sajjad Abid
From | Date | Subject | |
---|---|---|---|
Next Message | shammat | 2024-12-27 12:57:59 | Re: Reg. Postgres Unique contraint |
Previous Message | David Rowley | 2024-12-27 11:40:54 | Re: CTE Inline On TPC-DS Query 95 |