r/programming • • Sep 24 '20

PostgreSQL 13 Released!

https://www.postgresql.org/about/news/2077/
1.3k Upvotes

236 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Sep 24 '20

[deleted]

24

u/[deleted] Sep 24 '20

Lots of people think data integrity doesn’t matter. Until it bites them in the ass during “that one moment”.

Building in automatic data healing/recovery into your entire stack isn’t easy. That one place you didn’t put in recovery will end up being a critical issue one day.

If you’re using MySQL as an ordered cache for advertising, obviously losing the integrity really doesn’t matter. But that’s a rather special case that I’ve witnessed in between all the other improper uses of MySQL 5 in my short 10 year career

7

u/JB-from-ATL Sep 24 '20

Both jobs I've had I don't think they use foreign keys. It boggles my brain.

5

u/pezezin Sep 24 '20

MySQL didn't properly support foreign keys for a long time, and even though they were added about 15 years ago, even today many people keep working with that mindset. A few months ago I was shocked to find that Wordpress doesn't define foreign keys.

Another fun fact is that MySQL didn't have real support for CHECK constraints until two years ago. You could define them, but they were ignored. That bite me in the ass a couple of times...