News for hackers. Stuff that matters.
Re:Can PostgreSQL pickup where MySQL left off? by Udo on Monday August 29, 2011 @06:59AM (#2936721)
I can say from a web dev's perspective that the ubiquitousness of MySQL is only part of the allure (an important part though). MySQL makes simple stuff very easy to implement, it's a great solution if you just want your database to store your stuff and get out of the way. Sure, like any other DB it requires some expertise if you want performance, but it makes this incredibly simple. It just works and you don't spend a lot of time arguing with the software.

It also has a single feature that I find incredibly cool: it supports automatically generated row IDs. It's been a while since I last tried Oracle and Postgres, but at the time you had to create a second table just for a sequence number and it was extremely awkward to handle.

Could the auto-increment feature in MySQL be better? Sure, for example it would be nice to have an option where the row is identified by a hash value instead of a continuous sequence. But even in its limited form today it beats having to wrestle with the glued-together equivalent as implemented in "real databases".

Re:Can PostgreSQL pickup where MySQL left off? by masklinn on Monday August 29, 2011 @07:57AM (#2936842)
> It also has a single feature that I find incredibly cool: it supports automatically generated row IDs. It's been a while since I last tried Oracle and Postgres, but at the time you had to create a second table just for a sequence number and it was extremely awkward to handle.

Must have been a while indeed. Postgres's SERIAL datatype has been available at least since 6.4. Postgres 6.4 was released in 1998.

Re:Can PostgreSQL pickup where MySQL left off? by wlll on Monday August 29, 2011 @07:44AM (#2936800)
Postgres has had auto-incrementing row ids for a while, see this example: https://gist.github.com/1178237
Re:Can PostgreSQL pickup where MySQL left off? by Udo on Monday August 29, 2011 @07:49AM (#2936826)
I may be wrong, but isn't that just a syntactical shortcut for creating a separate sequence table?
Re:Can PostgreSQL pickup where MySQL left off? by masklinn on Monday August 29, 2011 @07:58AM (#2936844)
Yes (that's noted in the gist). But the end result's the same, instead of writing AUTOINCREMENT you write SERIAL. That's about it, the only issue may happen if you drop the table (the sequence will not be dropped, not a huge issue in practice)
Re:Can PostgreSQL pickup where MySQL left off? by Udo on Monday August 29, 2011 @08:00AM (#2936850)
Did you notice any differences in performance?

Edit: I'm not saying there are, but it feels like there might be some repercussions when you take the underlying implementation into account. It would be interesting to know if someone conducted comparative tests about this.