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

There is one point I need to add it here. Note that I'm not DB expert, but I need to say why I prefer Postgres over Mysql.

Create a table like the following:

create table user (name varchar(4));

MySql:

insert into user (name) values ('antoaravinth');

The above statement works even though I have given the size of my varchar as 4! And retrieving gives me `anto`!!

Postgres:

insert into user (name) values ('antoaravinth');

Stops me there with the relevant exception! That shows how Postgresql is doing small things right.

After seeing this, I never used MySql!




As said in many other comments: This is because you used MySQL in non strict mode. You don't run MySQL on Production in non strict mode.


As said in many other comments, the idea that there is even a "strict mode" which was not on by default for many years is itself a problem and a red flag for other problems.


Tell that to developers who develop with the default config and then expect that to work in "Production".




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: