I'm contemplating the switch (mainly because of the more permissive license), and tend to hear a lot of Internet murmuring about how much better Postgres is than MySQL, but not many specifics. What do you do in Postgres that make you more productive, or you find elegant?
It doesn't have to be fancy, for example some of my favorite things about MySQL include
PostgreSQL's most useful features (which MySQL lacks), in my opinion, are:
generate_series and set returning functions in generalLIMIT and OFFSET clausesDISTINCT ON clauseJOIN methods (MERGE JOIN and HASH JOIN)You can do wonders with them.
PostgreSQL code also often looks more elegant (note that "looks" doesn't mean "performs"), since you can use nice casting syntax (::), nice RECORD types and these kinds of stuff.
Drawbacks are:
custom_variable_classes)DISTINCT and GROUP BY operations are laggy.Since both these systems are quite powerful and well-developed, they differ mainly in such fancy features (that most developers never even use).
For basic SQL, they're both good.
"start transaction; delete table foo; rollback;" and foo will still be there.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With