2010/1/23 Craig Ringer <craig@xxxxxxxxxxxxxxxxxxxxx>: > > An InnoDB `AUTO_INCREMENT' column under MySQL 5.x is pretty similar to a > sequence. > > I increasingly think it's pretty safe to just > 's/AUTO_INCREMENT/SERIAL/g' > in DDL. Apps that use MyISAM aren't going to be fussy about how it works, > and apps that use InnoDB get Pg-like behaviour anyway. Yes, but I have seen it many times, where people needed a sequence that drives more than just one column/table. Can't do it with the simplistic mysql approach. > Modern (5.x-something-late) MySQL with the InnoDB storage engine is a very > different beast from MySQL 3.x/4.x or MySQL 5.x with MyISAM. It still has > some scary data-conversion habits and you need to turn on several different > kinds of strict modes and behave-standard-ways modes to get it to play nice, > but if you have and you're moving over to Pg you shouldn't actually have too > rough a time. > > ( Unless you use some of the MySQL features, like its upsert command REPLACE > or the INSERT ... ON DUPLICATE KEY UPDATE ..., that just have no equivalent > in Pg. Or you're relying on scary MySQL-isms like 0000-00-00 dates. ). this is easily done with triggers, and again is more powerful. MySQL was designed to be easy to grasp for someone with limited time/skill in SQL. And as everything that is meant to be simple, it fails quickly if you need to use it for something more realistic/complete/insert your word here. Lets be honest, people use mysql with the default backend usually, because innodb is just too slow. I dumped mysql long time ago, but I still hear from people that it suffers from same problems. Hence, I still recommend people to switch to postgresql. Btw, if you want to help, please ask as many hosting places as you can about postgresql support, mentioning that you would probably buy it from them, if they had postgresql for the same price as mysql (read, for free, included in cheapest package usually). This is so far the biggest problem to overcome, and the major reason people choose mysql in first place. -- GJ -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general