Re: ask for review of MERGE

Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>

From: Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
To: Boxuan Zhai <bxzhai2010@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2010-09-23T11:55:29Z
Lists: pgsql-hackers
On 2010-09-23 1:31 PM +0300, Boxuan Zhai wrote:
> I have just generate a new patch of MERGE command.

I haven't followed the discussion very closely, but this part in the 
regression tests caught my attention:

+-- we now have a duplicate key in Buy, so when we join to
+-- Stock we will generate 2 matching rows, not one.
+-- According to standard this command should fail.
+-- But it suceeds in PostgreSQL implementation by simply ignoring the 
second

It doesn't seem like a very good idea to go against the standard here. 
The "second" row is not well defined in this case so the results are 
unpredictable.


The patch is also missing a (trivial) change to explain.c.


Regards,
Marko Tiikkaja