
PostgreSQL, Rails, and why you should care - _pius
http://awesomeful.net/posts/45-postgresql-rails-and-why-you-should-care
======
ivanyv
Plus, FWIW, with MySQL I've had lots of table corruption issues over the years
(although it's been a couple of years since then, so it might be more stable
now).

Never had any issue with PostgreSQL.

~~~
patio11
I have heard about the MySQL table corruption thing before, but frankly I'm
not exactly a database expert and never really worried about it. Then one of
the critical tables backing Bingo Card Creator died, hard. (Thank God it was
on the staging server, not on production.) I still have no clue why, and was
unable to recover anything from it -- I ended up having to restore from
backup.

This was on... crud, I don't really know what version off the top of my head,
but it is on whatever Ubuntu ships with in summer 2009.

P.S. Have you checked _your_ backups recently?

------
olefoo
One thing that PostgreSQL can do that mysql cannot (so far as I know) is lets
you define your own triggers and even your own data types. In pretty much
whatever language you choose.

PL/Ruby <http://moulon.inra.fr/ruby/plruby.html> for instance, could be used
to define an insert trigger that would check the values being inserted into a
table and perform arbitrary actions based on them; say, an alert if a user on
a watchlist (another table in the db) changes certain values in their profile
entry, for example.

It can lead to a fairly clean coding style where data consistency and
manipulation code lives in the database.

------
barrkel
I think some folks sense blood in the water around MySQL, and are trying to
grow marketshare.

~~~
PonyGumbo
Oh, I don't know - this is the same kind of "Hey everybody, PostgreSQL exists
and is really neat" article that people have been writing for years. It's only
poignant now that some of the MySQL issues have become harder to ignore.

------
astine
What in particular does this have to do with Rails?

~~~
teej
It wasn't much of an argument for Postgres either. He said it had lots of
features, kinda had speed, but oh wait those things don't matter because it
works with Rails and MySQL got bought by Oracle.

~~~
zmimon
Actually he also said that PostgreSQL has a permissive license with a whole
community of contributers where MySQL has Oracle and GPL and 1 corporate
contributor. That's a significant qualitative difference in their nature and
very well worth weighing up if you're deciding which way to go.

