3 ms·
If you agree with my point then it's not hard to see how postgres is more friendly: You can write a function in python (or a number of other languages) and sha
by jeffdavis 9y ago
If you agree with my point then it's not hard to see how postgres is more friendly:
You can write a function in python (or a number of other languages) and share code with your application, and use those functions almost anywhere in postgres (including unique indexes). That makes the unique indexes much more powerful, especially if you want to adapt to changes without rewriting all your data.
Or, you can use range types and an exclusion constraint to form a non-overlapping constraint that prevents schedule conflicts:
https://www.postgresql.org/docs/10/static/rangetypes.html https://www.postgresql.org/docs/10/static/rangetypes.html
There are tons of examples and others list them all the time. The problem is that a lot of people read past them because they don't see why semantics matter.
- stephenr 9y agoI didn't actually say I agree with you. I said I get your point. My point was that you admitted a single argument won't convince everyone that database semantics matter, and then went on to list two features that MySQL handles just fine, regardless of how well it handles the other things you care about. You may as well have said "a pet badger is better than a pet bulldog in so many ways, for example it will attack/chase home invaders". Edit: I have no actual idea if you can have a badger for a pet, or how effective they really are at home protection but I imagine they'd be badass at it.
- jeffdavis 9y agoMy reasoning is something like: "if these simpler database semantics matter, then maybe you should look at the more sophisticated semantics postgres has to offer". If you get my point but find flaws in my argument, well, I can live with that. Counterpoints welcome.