Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
PostgreSQL 9.1.2 (postgresql.org)
79 points by deedee on Dec 12, 2011 | hide | past | favorite | 10 comments


Does anybody know whether PostgreSQL is going to implement UPSERT or MERGE support any time soon? I hate having to lock tables to emulate this.


It is not actually certain whether a standards-compliant implementation of MERGE would actually solve the UPSERT case (there have been some interesting mailing list discussions related to this, as that seemed to be an incorrect yet long-standing assumption of some people defining the roadmap).

Regardless, you don't need a table lock to do it in any case. Doing so without such a lock is actually an example from the documentation:

http://www.postgresql.org/docs/current/static/plpgsql-contro...

In essence, you just do the UPDATE, and if you ge back no affected rows, you perform an INSERT. If the INSERT fails because the row already exists, you do the UPDATE again.


Postgres is wonderful and important, but consider before upvoting: What would HN look like if every x.y.z release of every wonderful and important piece of software landed on the front page?


I actually like it. Threads for new version releases like that are good for discussing new features, there's often someone who is very familiar with the product and the problem domain who explains the relevant issues for the rest of us, sometimes there are interesting debates about the general problems and the future of the particular product and its competitors. These threads are often very interesting and informative and in my opinion they are much more valuable and educating than another thread denouncing patents and copyright as the ultimate evil or accusing something or someone of censorship or something like that.


Agreed, although I'd hate HN to become a stream of minor version updates. Postgres is a bit different in that every 'minor' release actually contains a bunch of important changes.

Anyway, off to see if I can find the newest and greatest version for Ubuntu.


It's not that bad. I use Postgres and ought to keep up with their release schedule myself, but I've off-shored that bit of housekeeping to HN instead.


Keeping up with release notes or changelog is something hackers do, no?

I personally like how Hacker News and r/programming aggregates new changelogs of software I care about.


I assume postgres gets this treatment because HN considers it realitively under utilised.


I agree, but I never see these kinds of posts stay up very long.

If it gets too bad, it shouldn't be too hard to add some code that would accelerate their trip off the front page.


For me, it reminds me to finally install and test it for my GIS work. It's a RDBMS that's always been on the backburner for time reasons. I'm glad to see these posts because it lights a fire under my ass.




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

Search: