Why I, as Someone Who Likes MySQL, Now Want to Recommend PostgreSQL
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A long-time MySQL user explains why they now recommend PostgreSQL for new projects. The post acknowledges that many historical PostgreSQL weaknesses (VACUUM complexity, DDL operations, replication) have become less relevant in the managed cloud era. It then details concrete application-level advantages PostgreSQL still holds: ON CONFLICT DO NOTHING vs INSERT IGNORE, the RETURNING clause for getting back changed rows, more natural VALUES usage in JOINs and UPDATEs, window functions in update processing via CTEs, partial indexes, deferred foreign key constraints, pgvector support, and simpler character set/collation handling. The conclusion is not that MySQL is bad, but that PostgreSQL offers clearer advantages for application implementation today.
Table of contents
What used to be considered disadvantages of PostgreSQL has become much less significantEven so, PostgreSQL is stronger for application implementationFirst, the things MySQL 8 added and narrowed the gap onON CONFLICT DO NOTHING is not a replacement for INSERT IGNORERETURNING is very powerfulVALUES helps in real implementationBeing able to bring window functions into update processing is powerfulPartial indexes are a clear feature differenceForeign keys are much better in PostgreSQLIn MySQL, you cannot do vector operationsCharacter sets and collations are still more complicated in MySQLSummary3 Comments
Sort: