Why vapor 4 recommend Postgres

Hi everyone, I'm confusing about which database should I choose to develop an e-commerce app, MySql or Postgres, and I'm curious to know why vapor 4 recommends Postgres?

I would hazard a guess here that Postgres has a better defined wire protocol

2 Likes

Exactly this - the MySQL protocol had to be reverse engineered from the C library so initially was a bit flaky. However these days most of the bugs have been shaken out so either one is probably fine

3 Likes

I worked on both wire protocols, and was stunned by the gap between the two.

Postgres is more flexible, performant and better documented. Has a more thriving ecosystem around it and even more features.

I’ve never had anything I compared that was in favour of MySQL.

1 Like

That said, I've been using MySQL with Vapor for some of my projects and honestly, it works well. Most of the initial bugs have been ironed out by now, so either choice is viable—it really depends on your preference and the specific requirements of your project.