Re:The dangers of streaming across versions of glibc: A caut...
by mnw21cam on Tuesday January 08, 2019 @11:50AM
(#18856992)
This has the advantage that your database operations run a heck of a lot faster, but has the potential disadvantage that primary key uniqueness may not be maintained, if you think that alternate ways of writing the same characters in unicode matters for that.
[ Parent
| on HN ]
Re:The dangers of streaming across versions of glibc: A caut...
by rraval on Tuesday January 08, 2019 @12:07PM
(#18857173)
As you say, I'd question the technical motivation for enforcing uniqueness on unicode data in the first place (and as a primary key on top of that???)
However, if someone really wanted to accomplish this, they could probably use PostgreSQL's functional indices and unicode normalization to do it.
Re:The dangers of streaming across versions of glibc: A caut...
by greglindahl on Tuesday January 08, 2019 @12:04PM
(#18857139)
Normalization is a separate issue, you can normalize and then use the C collation order.
Re:The dangers of streaming across versions of glibc: A caut...
by BeeOnRope on Tuesday January 08, 2019 @12:19PM
(#18857294)
Sure but either you are talking about a fixed normalization algorithm which is not locale aware, in which case it doesn't solve the locale-specific unique key issue, or it is locale-aware and hence suffers the same problem with time-varying behavior.
Re:The dangers of streaming across versions of glibc: A caut...
by jrochkind1 on Tuesday January 08, 2019 @02:50PM
(#18858970)
You are using string/text values as a pk and trying to sort on em? I'd say this is another reason not to do that.
Re:The dangers of streaming across versions of glibc: A caut...
by BeeOnRope on Tuesday January 08, 2019 @06:04PM
(#18860652)
Well I am not doing any of the things in the comment chain leading up to this, but probably the mention of primary key was a red herring. The GP's [1] point was that some index constraint (they mentioned PK uniqueness, but it could really be any constraint) might not be correctly maintained if the DB was not aware of the correct collation order. So from the point of view of the renderer, which is locale aware and uses locale-based collation, the DB is violating the constraints.
---
[1] The GP relative to my reply