On Apr 25, 2010, at 1:40 PM, Roland Bouman wrote:

> Hi Jobin, All,
> 
> On Sun, Apr 25, 2010 at 11:03 AM, Jobin Augustine <[email protected]> wrote:
> 
> Jobin, I read up a bit more on MERGE, and indeed it seems not trivial
> to rewrite REPLACE INTO into a MERGE INTO statement.
> Good point - I never gave it that much thought, so thanks for pointing that 
> out.
> 
>>>> all these headache may go if we could discontinue support for mysqlism.
>> 
>>> But that would postpone the problem until you would like to add
>>> support for the standard MERGE INTO syntax.
>>> In other words, it would need to be solved anyway.
>> 
>> No. not requied, MERGE is bit different on its use.
>> (just like its name sounds)
>> 
>> let me explain, the overall syntax of merge will look like:
>> As we can see merge works like a sub query fashion. and UPDATE and INSERT
>> are part of it (3rd and 5th line).
>> so in effect MERGE statement splits into a SELECT statement (1st line)
>> followed by UPDATE or INSERT.
>> 
>> Here the advantage is, UPDATE and INSERT are explicit. so no ambiguity
>> remains.
> 
> Ok. So if I understand correctly, your point is that since MERGE
> explicitly results in either INSERT or UPDATE, there is never any
> doubt what function should be called and what it's result should
> indicate.
> I think that's a fair point.

Yeah that actually sounds really awesome to me. I always like it when things 
are explicit.

$0.02

Tim


_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to