Skip site navigation (1) Skip section navigation (2)

Re: B-tree unique index duplicate key error happens only in SUSE 9.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zhenlei Cai <jpenguin(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: B-tree unique index duplicate key error happens only in SUSE 9.3
Date: 2005-06-19 15:16:56
Message-ID: 17652.1119194216@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Zhenlei Cai <jpenguin(at)gmail(dot)com> writes:
> This bug happens in SUSE 9.3 on both Pentium 4 and AMD64, whether the
> binaries are from  postgresql-8.0.1 RPMs on the SUSE 9.3 DVD or are
> built from 8.0.3 source code. However this bug does NOT happen with a
> Debian box (unstable) running 8.0.3 on an x86 (Athlon XP, whether
> binary or built from source). The problem is Postgresql claims two

What makes you think this is a Postgres bug, rather than a bug in the
locale definition you are using on the SUSE box?  Try feeding the two
strings in question to strcoll() and see what happens.

One way that you can get inconsistent results from strcoll() is if you
feed it strings that are invalid according to the character set encoding
that strcoll() thinks you are using, which is to say the encoding
implied by the current LC_CTYPE locale setting.  So it's possible that
the real problem is that you have Postgres' database encoding set to
something that's incompatible with the postmaster's LC_CTYPE locale.
(Try "show lc_ctype" to see what that is exactly.)

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-06-19 15:18:08
Subject: Re: BUG #1721: mutiple bytes character string comaprison error
Previous:From: John HansenDate: 2005-06-19 14:05:07
Subject: Re: B-tree unique index duplicate key error happens only in SUSE 9.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group