AnyhowStep / sql-compiler

An experimental SQL compiler
MIT License
0 stars 0 forks source link

Investigate collations potentially messing with DETERMINISTIC stored functions #5

Open AnyhowStep opened 3 years ago

AnyhowStep commented 3 years ago

From gitter:

From what I understand, if I have a function CMP("a", "b") that returns the sort order of "a" and "b" that function cannot be marked as IMMUTABLE, because a change to the collation may change its output (since the sort order of those two characters may have changed) IMMUTABLE functions need to be IMMUTABLE across database versions, too.

Or at least, in MySQL, they do (I forget how mysql marks immutable procedures)

AnyhowStep commented 3 years ago

http://thewindowsupdate.com/2020/12/13/dont-let-collation-versions-corrupt-your-postgresql-indexes/

AnyhowStep commented 3 years ago

https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html

image

MySQL is probably not affected