Hacker News new | ask | show | jobs
by GravityWell 4691 days ago
I'm not sure why MySQL seems to have received more attention over the years. PostgreSQL might be more robust.

One point about PostgreSQL that bothered me was the apparent lack of case insensitive collation. Where SQL Server, Oracle, and MySQL default to case insensitive, PostgreSQL defaults to case sensitive, and there was no built in way to change this, so you have to do things like "WHERE LOWER(namecol) = 'jdoe'" to work around it. At least that was the situation last time I checked.

4 comments

For a long time MySQL was easier to get started with, and the integration with PHP made it a popular choice on shared hosting services. A lot of developers cut their teeth on MySQL, many haven't felt the need to seek out alternatives.
Yeah, for a long time MySQL was completely easy on Windows, and Postgres required Cygwin. Granted, that was years ago now, but I think it hurt adoption significantly.

Also, there has long been a perception that Postgres was slower. I still run into that from time to time today.

Sometimes early adoptions in technology establish the trend long term.

Personally, I was rather put off by earlier mySQL versions on windows, that required commercial licenses for windows, but was free on other platforms. Also, the their weird perception of software connecting to mysql needing to be gpl, or commercially licensed (legally or not, it was an f'd up pov).

Each time I used mySQL was an oddity... a binary field would effectively treat the ascii value of a byte as a case-insensitive character... You could use ANSI SQL field quotes for everything but foreign key statements... Curly ticks, not just the ascii apostrophe could break you out of an SQL statement...

Now, these may well all be fixed today, I just find it hard to believe a lot of these issues didn't break MySQL's adoption rates by others.

What surprises me even more than PostgreSQL's lack of broader adoption was that FirebirdSQL didn't see wider adoption all along either. Considering it works in both embedded and stand alone server roles. I really just don't get why people like mySQL... I mean if you are using it as a mostly write dump table (myisam) without the need for foreign keys, sure... but anything with more than 3-4 tables, I just can't see why someone would chose mySQL over many other better, and free options.

Beyond some early adoption along with PHP (another hideous platform imho) that happened to stick, and spread.

Yeah, we're in the process of migrating from MySQL to PostgreSQL now. I don't think any other project at work has kept me up at night as much as this one.
There's citext[1] for the case sensitivity problem.

[1] http://www.postgresql.org/docs/9.0/static/citext.html

Because at some point in time mySQL was widely installed with all providers, and PostgreSQL wasn't. I guess it was just a bit sooner adoption-ready, and that counted.
Do you really think that was a factor for Google, Facebook? One word: replication.
The word "slony" still makes me tremble in fear, even years after I last used it.
Oracle is case sensitive by default.