db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Dublicate key error on key values with hyphen
Date Thu, 01 Jul 2010 22:04:27 GMT
On 07/ 1/10 11:46 PM, Max Stempfhuber wrote:
> Hi Knut,
> thanks for the quick resonse!
> Yes, my database is set up with territory-based collation. I see your
> point, but would the behaviour you describe be a feature or a bug in
> regard to primary key values. Of cause I expected this for string
> comparisons, but not for index values.
> Is it worth filing a bug?

My understanding is that this is a feature and that it works as
designed. Primary key implies a unique constraint on the column. SQL's
definition of uniqueness is based on the notion of equality, and if the
two strings are considered equal (even though they are not identical),
they are not unique. So I believe it is correct to reject the second
insert if the collation rules ignore hyphens.

Knut Anders

View raw message