Hacker News new | comments | show | ask | jobs | submit login

I dont know if this is a good idea or not, but IMHO the only way this can happen is to have a postgres compatible version of wordpress.

Would that actually be that hard? A MySQL compatibility mode for PostgeSQL would be awesome!

It's not even that much to do - support INSERT IGNORE, ON DUPLICATE KEY UPDATE, INSERT REPLACE, and make a "relaxed" mode where too long strings are truncated and NULLs inserted into NOT NULL turn into 0 or the empty string and you are virtually all the way there.

"A MySQL compatibility mode for PostgeSQL would be awesome!"

I think it can be good to offer a few conveniences to make it easier to switch, but I think they should be limited in scope.

Postgresql is not trying to be mysql -- that need is already filled by MariaDB and others. Trying to pretend that postgres is mysql would just make users frustrated and disappointed.

Think about it like moving to a foreign country. The residents try to be as friendly and accommodating as they can when it comes to food, shelter, transportation, directions, etc. There are often even multi-lingual people in the critical places. But eventually the goal is to adapt to the local culture and bring a hint of your previous culture into the mix; not completely recreate your culture in a new place.

They're not that different. They are both SQL, it's just a small amount of extra syntax that MySQL created - useful syntax, and PostgeSQL supports those things. In a different way, sure, but the basic idea of those things is not that different.

"They are both SQL, it's just a small amount of extra syntax"

I suspect more than a few syntax adjustments would be required before users could rely on the port. The upstream project (e.g. wordpress) would need to be aware that their users were trying to use postgres in order for such users to be actually happy.

I could be wrong, but I have not seen a port of a real app that came down to just syntax differences.

It might be a different story between two implementations that follow the SQL standard reasonably well (MySQL is pretty far from the standard in many ways), but even in that case I'd be cautious.

But would that mean allowing an app to set strict mode off and ask what the day after 2009-02-30 is?

I think the main point is that MariaDB is a better MySQL than PostgreSQL ever will be. I don't see what anyone is gaining by turning postgres into yet another mysql.

Postgres is doing great being postgres. To the extent postgres can accommodate converts from mysql, or oracle or sql server, then also great. But we're too busy inventing new stuff to endlessly chase the quirks of other systems.

It can be a configuration setting like `willfully_ignore_sql_rules_and_act_broken=1`. Postgres can be cantankerous to the point of frustration, but at least it sticks to its principles.

MySQL has a postgres sql_mode. Of course it would be nicer if apps couldn't mess with sql_mode....

No there shouldn't be a mode in PostgreSQL for this. The problem is that this means abandoning the idea of hard data constraints.

interesting - I was actually thinking of Wordpress having to rewrite its code. But what you said is more interesting - especially since Postgresql already has a SQL Server compatibility (you can replicate from SQL Server to Postgres).

It would be a cool kickstarter to fund something like this.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact