public inbox for [email protected]
help / color / mirror / Atom feedReg. Postgres Unique contraint
7+ messages / 6 participants
[nested] [flat]
* Reg. Postgres Unique contraint
@ 2024-11-27 04:14 Sajjad Abid <[email protected]>
2024-11-27 04:18 ` Re: Reg. Postgres Unique contraint Diomedes Dominguez <[email protected]>
2024-12-27 12:57 ` Re: Reg. Postgres Unique contraint [email protected]
0 siblings, 2 replies; 7+ messages in thread
From: Sajjad Abid @ 2024-11-27 04:14 UTC (permalink / raw)
To: [email protected]
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*
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Reg. Postgres Unique contraint
2024-11-27 04:14 Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
@ 2024-11-27 04:18 ` Diomedes Dominguez <[email protected]>
2024-11-27 04:27 ` Re: Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
1 sibling, 1 reply; 7+ messages in thread
From: Diomedes Dominguez @ 2024-11-27 04:18 UTC (permalink / raw)
To: Sajjad Abid <[email protected]>; +Cc: [email protected]
Which version of Postgres are you using?
El mié, 27 de nov de 2024, 00:14, Sajjad Abid <[email protected]>
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*
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Reg. Postgres Unique contraint
2024-11-27 04:14 Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
2024-11-27 04:18 ` Re: Reg. Postgres Unique contraint Diomedes Dominguez <[email protected]>
@ 2024-11-27 04:27 ` Sajjad Abid <[email protected]>
2024-11-27 06:22 ` Re: Reg. Postgres Unique contraint Burcin Yazici <[email protected]>
2024-12-27 11:54 ` RE: Reg. Postgres Unique contraint [email protected]
0 siblings, 2 replies; 7+ messages in thread
From: Sajjad Abid @ 2024-11-27 04:27 UTC (permalink / raw)
To: Diomedes Dominguez <[email protected]>; +Cc: [email protected]
Version of Postgres is 12.9
On Wed, Nov 27, 2024 at 9:49 AM Diomedes Dominguez <
[email protected]> wrote:
> Which version of Postgres are you using?
>
> El mié, 27 de nov de 2024, 00:14, Sajjad Abid <[email protected]>
> 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*
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Reg. Postgres Unique contraint
2024-11-27 04:14 Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
2024-11-27 04:18 ` Re: Reg. Postgres Unique contraint Diomedes Dominguez <[email protected]>
2024-11-27 04:27 ` Re: Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
@ 2024-11-27 06:22 ` Burcin Yazici <[email protected]>
2024-11-27 07:13 ` Re: Reg. Postgres Unique contraint Vitalii Tymchyshyn <[email protected]>
1 sibling, 1 reply; 7+ messages in thread
From: Burcin Yazici @ 2024-11-27 06:22 UTC (permalink / raw)
To: Sajjad Abid <[email protected]>; +Cc: Diomedes Dominguez <[email protected]>; [email protected]
--Apple-Mail-FB03E3E0-7514-4BFB-8EEB-E24DCDF134FD
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto">hi,<div><br></div><div>make sure that the v=
alues are really duplicated first..</div><div><br></div><div>- check t=
he collation of column. </div><div>- check accent chars exist.</div><di=
v>- check lowercase, uppercase</div><div>- check white space, tabs etc.</div=
><div><br></div><div><div dir=3D"ltr">burcin</div><div dir=3D"ltr"><br><bloc=
kquote type=3D"cite">On 27 Nov 2024, at 07:28, Sajjad Abid <abidsajjad@gm=
ail.com> wrote:<br><br></blockquote></div><blockquote type=3D"cite"><div d=
ir=3D"ltr">=EF=BB=BF<div dir=3D"ltr">Version of Postgres is 12.9</div><br><d=
iv class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Nov 2=
7, 2024 at 9:49=E2=80=AFAM Diomedes Dominguez <<a href=3D"mailto:diomedes=
[email protected]">[email protected]</a>> wrote:<br></div><=
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"><p dir=3D"ltr">Which version=
of Postgres are you using? </p>
<br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">El mi=C3=
=A9, 27 de nov de 2024, 00:14, Sajjad Abid <<a href=3D"mailto:abidsajjad@=
gmail.com" target=3D"_blank">[email protected]</a>> escribi=C3=B3:<br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bo=
rder-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div=
>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</div><div> user_name character varying(50) <br></div><div>=
CONSTRAINT
user_name_unq UNIQUE (
user_name )<br></div><div><br></div><div>Kindly help me to resolve this issu=
e.</div><div><br></div><span class=3D"gmail_signature_prefix">-- </span><br>=
<div dir=3D"ltr" class=3D"gmail_signature"><font color=3D"#3366FF"><b>Thanks=
& Regards, <br><br>Sajjad Abid</b></font><br></div></div>
</blockquote></div>
</blockquote></div><div><br clear=3D"all"></div><div><br></div><span class=3D=
"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signa=
ture"><font color=3D"#3366FF"><b>Thanks & Regards, <br><br>Sajjad Abid</=
b></font><br></div>
</div></blockquote></div></body></html>=
--Apple-Mail-FB03E3E0-7514-4BFB-8EEB-E24DCDF134FD--
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Reg. Postgres Unique contraint
2024-11-27 04:14 Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
2024-11-27 04:18 ` Re: Reg. Postgres Unique contraint Diomedes Dominguez <[email protected]>
2024-11-27 04:27 ` Re: Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
2024-11-27 06:22 ` Re: Reg. Postgres Unique contraint Burcin Yazici <[email protected]>
@ 2024-11-27 07:13 ` Vitalii Tymchyshyn <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Vitalii Tymchyshyn @ 2024-11-27 07:13 UTC (permalink / raw)
To: Burcin Yazici <[email protected]>; +Cc: Sajjad Abid <[email protected]>; Diomedes Dominguez <[email protected]>; [email protected]
We saw it when OS image changed resulting in collation library change, so
index lookups started to fail and reindex was needed to fix it.
ср, 27 лист. 2024 р. о 16:23 Burcin Yazici <[email protected]> пише:
> hi,
>
> make sure that the values are really duplicated first..
>
> - check the 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 <[email protected]> wrote:
>
>
>
> Version of Postgres is 12.9
>
> On Wed, Nov 27, 2024 at 9:49 AM Diomedes Dominguez <
> [email protected]> wrote:
>
>> Which version of Postgres are you using?
>>
>> El mié, 27 de nov de 2024, 00:14, Sajjad Abid <[email protected]>
>> 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*
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: Reg. Postgres Unique contraint
2024-11-27 04:14 Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
2024-11-27 04:18 ` Re: Reg. Postgres Unique contraint Diomedes Dominguez <[email protected]>
2024-11-27 04:27 ` Re: Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
@ 2024-12-27 11:54 ` [email protected]
1 sibling, 0 replies; 7+ messages in thread
From: [email protected] @ 2024-12-27 11:54 UTC (permalink / raw)
To: 'Sajjad Abid' <[email protected]>; 'Diomedes Dominguez' <[email protected]>; +Cc: [email protected]
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 <[email protected]>
Envoyé : mercredi 27 novembre 2024 05:28
À : Diomedes Dominguez <[email protected]>
Cc : [email protected]
Objet : Re: Reg. Postgres Unique contraint
Version of Postgres is 12.9
On Wed, Nov 27, 2024 at 9:49 AM Diomedes Dominguez <[email protected] <mailto:[email protected]> > wrote:
Which version of Postgres are you using?
El mié, 27 de nov de 2024, 00:14, Sajjad Abid <[email protected] <mailto:[email protected]> > 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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Reg. Postgres Unique contraint
2024-11-27 04:14 Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
@ 2024-12-27 12:57 ` [email protected]
1 sibling, 0 replies; 7+ messages in thread
From: [email protected] @ 2024-12-27 12:57 UTC (permalink / raw)
To: [email protected]
Am 27.11.24 um 05:14 schrieb Sajjad Abid:
> 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 )
Most likely a locale/encoding problem.
See: https://wiki.postgresql.org/wiki/Locale_data_changes
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2024-12-27 12:57 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-27 04:14 Reg. Postgres Unique contraint Sajjad Abid <[email protected]>
2024-11-27 04:18 ` Diomedes Dominguez <[email protected]>
2024-11-27 04:27 ` Sajjad Abid <[email protected]>
2024-11-27 06:22 ` Burcin Yazici <[email protected]>
2024-11-27 07:13 ` Vitalii Tymchyshyn <[email protected]>
2024-12-27 11:54 ` [email protected]
2024-12-27 12:57 ` [email protected]
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox