Re:Ask HN: It's 2023, how do you choose between MySQL and Po...
by arp242 on Friday May 12, 2023 @01:28AM
(#35912261)
There is no way to see from the query itself if it's case-sensitive or insensitive; that is what I meant.
[ Parent
| on HN ]
Re:Ask HN: It's 2023, how do you choose between MySQL and Po...
by evanelias on Friday May 12, 2023 @01:56AM
(#35912459)
Eh, just from a SQL query alone, there's no way to see that (lower(email)) is indexed, or see column data types etc. That metadata lives in the table definition, which is a normal place for it, so it seems reasonable for the collation / case-insensitivity to not be explicit in the query text.
Besides, MySQL also supports functional indexes, so you could do the (lower(email)) approach in MySQL too if you really want!
Re:Ask HN: It's 2023, how do you choose between MySQL and Po...
by arp242 on Friday May 12, 2023 @02:22AM
(#35912665)
No, you can't see everything, but you can see the exact comparison it's making. Is that useful? You can decide that for yourself but I like being able to see as much of the logic (and thus verify the correctness) in the query itself. Also helps with copy/paste and some other things.
I never said you can't use functional indexes in MySQL. Someone said "you can't do this in PostgreSQL" and I just commented "here's (one way) to do this, maybe that's helpful some day". That's it.