Re: ask for review of MERGE - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: ask for review of MERGE
Date
Msg-id 4C9B4031.4030400@cs.helsinki.fi
Whole thread Raw
In response to ask for review of MERGE  (Boxuan Zhai <bxzhai2010@gmail.com>)
Responses Re: ask for review of MERGE  (Boxuan Zhai <bxzhai2010@gmail.com>)
List 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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Standby registration
Next
From: Bernd Helmle
Date:
Subject: Re: WIP: Triggers on VIEWs