Re: MERGE Specification

Jim C. Nasby <decibel@decibel.org>

From: Decibel! <decibel@decibel.org>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Treat <xzilla@users.sourceforge.net>, pgsql-hackers@postgresql.org, Martijn van Oosterhout <kleptog@svana.org>, Gregory Stark <stark@enterprisedb.com>, "A.M." <agentm@themactionfaction.com>
Date: 2008-04-25T12:45:15Z
Lists: pgsql-hackers
On Apr 25, 2008, at 3:28 AM, Simon Riggs wrote:
>> I recently came across the expression "YAGNI", and think it's  
>> probably
>> pretty relevant to this discussion:
>> http://en.wikipedia.org/wiki/You_Ain't_Gonna_Need_It
>
> In matters of technical implementation, I follow you almost without
> question, and very happily so.
>
> I think all of us should be careful when expressing views on what  
> other
> people need or don't need. We sleep soundly after having given such an
> opinion, but that doesn't make those opinions valid. I'm not sure if
> there is a pithy acronym for that thought.


Agreed. Many people on hackers don't actually deal with production  
systems, so it's easy to look at things from an academic standpoint  
and not a practical one. This is generally a Good Thing (I think  
MySQL is an example of what happens when you don't do that), but it  
does need to be balanced by real-world needs. And not all of those  
needs are always well represented on the lists.

In this case, I have bulk-load code that could certainly use MERGE.  
It's not that hard to write code that will handle this in a way  
that's not safe from race conditions, so it's unlikely that we'll see  
that many requests, but that doesn't mean a fast MERGE wouldn't be  
useful. It certainly would have saved me some effort, and it would  
probably out-perform the current code.
-- 
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828