Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tGBRu-001OGs-Pz for pgsql-performance@arkaria.postgresql.org; Wed, 27 Nov 2024 06:22:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tGBRt-00CKSy-6Q for pgsql-performance@arkaria.postgresql.org; Wed, 27 Nov 2024 06:22:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tGBRs-00CKSq-SC for pgsql-performance@lists.postgresql.org; Wed, 27 Nov 2024 06:22:52 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tGBRq-0046VB-BL for pgsql-performance@lists.postgresql.org; Wed, 27 Nov 2024 06:22:51 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-432d86a3085so58184595e9.2 for ; Tue, 26 Nov 2024 22:22:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732688569; x=1733293369; darn=lists.postgresql.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=rGFib+C2hXPzg+fT4kPpH0oz1tgRiouqBmXWVmCbmPQ=; b=hzmlPwtmm6TKrYKvmeewN3OVjtyAZw7efzY4MjDfMkUs6eIUj/bepNUuo0u7dBoxHs QzJMQvkmrHFNfWMqkVi8N03oYBrUN16hNMX5cn/DwrTp77Pgt6wkfgFd1+3gXsf08uHs GiqOG+AFiRzms1bcSGAU/6/5tIM/cJWu23gjeUTofsKUg7XigyeBv2Vtnwsa2Cd+Yceh 1Xt8yO1/S4AaJ/5e7VUgxbvOSNXyNCqpx4i/EoF65+uDUfBqKtdgHTBeubZyL1Pb5U2C t0BhKAPUwieCq5++9OvYRTs+W2W4VOYd9+3bstkAehp7em2cEyDMWtWM3Dz7ndBvBnvy obsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732688569; x=1733293369; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rGFib+C2hXPzg+fT4kPpH0oz1tgRiouqBmXWVmCbmPQ=; b=B0iUUQ0XX2Xmued303g5qnwSdzHFy2jr+MM1R6P/qlsmwq+bpQBkbDfO8wAyjsGInP bBYWklQSGPr5j8FErEanfNpJTBJhh6Fm3NA7C8n7z2AgsyNzjDIuxeyD57nPeepPKFJp ATl/fFHW5bNoK2g1mclmOcMFRhMrfiBGV2uzB6E0vZJFhF44FbT0vyjfW3IidoYPe+jc LD2YsNZ85nOId8xMLWvl298A5SOV2bChSBZlvhRJgqPy3N0cHEYudfsIU2iQmmf2DNqt s1o5/QyrZM16hhFI6Y+fGdmSjYWyOelml431O+/BnewEINuHVCo7QScxhOKgEykCCNE2 axRw== X-Forwarded-Encrypted: i=1; AJvYcCV42b5PEgUBSGSTGLLEARKK3LxIib3J4Fm/bnsqeX3RVv9U4v11mK8qbyJ+l65WO+aV5AAWV04tx+xqDoDmJkOxtg==@lists.postgresql.org X-Gm-Message-State: AOJu0YxngZgXq+r+GZN8Hu7TR1EHDXMOPWcSpsF85CSYmlc2y22x7k5c 9GjPvoP3KVBtQZ40ePXL6T2mOIgqq+f9rbIFMJgBCMRgyNyer292 X-Gm-Gg: ASbGncuYpIAt6tu3vfY8R+myQBWeyIKwpIVlffRS+854WOwMBjtdTGn6bU1t3CCnRiy f2elrt5lvM4nwxa6frKuK1K4+jpoTlT+zWo3tCDPQhF99Bvca09Nm3iwKzKUbdSKH3adR913Fmb EB0IT7vY0VRSDx3Iuo8GQpTZ3wlhhpKD2gNdj3ke3BhX5gH53bkyAaj/VRFZnLJUTEgsS1loyQF iQtpavzkci7bpg+R30uCIUbNn0IszdSZ9LtZgFXYvmzJR1w/wOZj2qDWEO6FNXAXSRTC0c= X-Google-Smtp-Source: AGHT+IEb12R30hl+0YgKZQ/WzQa2obpfn/pBgpncT8EbZoOd7neSSX/NAzhu37dd7y4PxVtsNdxlPA== X-Received: by 2002:a05:600c:1ca7:b0:434:a10f:52fa with SMTP id 5b1f17b1804b1-434a9dfbc4emr12974875e9.32.1732688568699; Tue, 26 Nov 2024 22:22:48 -0800 (PST) Received: from smtpclient.apple ([176.41.128.176]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbed9a8sm15269512f8f.92.2024.11.26.22.22.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Nov 2024 22:22:48 -0800 (PST) Content-Type: multipart/alternative; boundary=Apple-Mail-FB03E3E0-7514-4BFB-8EEB-E24DCDF134FD Content-Transfer-Encoding: 7bit From: Burcin Yazici Mime-Version: 1.0 (1.0) Subject: Re: Reg. Postgres Unique contraint Date: Wed, 27 Nov 2024 09:22:36 +0300 Message-Id: References: Cc: Diomedes Dominguez , pgsql-performance@lists.postgresql.org In-Reply-To: To: Sajjad Abid X-Mailer: iPhone Mail (22B91) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail-FB03E3E0-7514-4BFB-8EEB-E24DCDF134FD Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable hi,

make sure that the v= alues are really duplicated first..

- check  t= he collation of column. 
- check accent chars exist.
- check lowercase, uppercase
- check white space, tabs etc.

burcin

On 27 Nov 2024, at 07:28, Sajjad Abid <abidsajjad@gm= ail.com> wrote:

=EF=BB=BF
Version of Postgres is 12.9

On Wed, Nov 2= 7, 2024 at 9:49=E2=80=AFAM Diomedes Dominguez <diomedes.dominguez@gmail.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le= ft:1px solid rgb(204,204,204);padding-left:1ex">

Which version= of Postgres are you using?


El mi=C3= =A9, 27 de nov de 2024, 00:14, Sajjad Abid <abidsajjad@gmail.com> escribi=C3=B3:
=
A column is character varying(50), also on this column a unique constraint&= nbsp;is defined, but I found some duplicate values in this column for some r= ecords
  user_name character varying(50) 
=   CONSTRAINT  user_name_unq   UNIQUE ( user_name )

Kindly help me to resolve this issu= e.

--
=
Thanks= & Regards,

Sajjad Abid



--
Thanks & Regards,

Sajjad Abid

= --Apple-Mail-FB03E3E0-7514-4BFB-8EEB-E24DCDF134FD--