Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
PostgreSQL, Rails, and why you should care (awesomeful.net)
30 points by _pius on Aug 4, 2009 | hide | past | favorite | 9 comments


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.


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?


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.


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


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.


Ha, that's kinda true, I suppose. Sun gave MySQL the kiss of death.

I plug postgres constantly, myself, and I do want to see it get more popular and have a larger community of support (heh, although more users can mean the inverse of supportive community!). I do think it's a superior technology to MySQL, but every tool has its place. Would be good for more people to know the elephant is out there, and all the cool stuff it can do :-)


What in particular does this have to do with Rails?


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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: