From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: MERGE vs REPLACE |
Date: | 2005-11-14 20:32:29 |
Message-ID: | 20051114203229.GI18570@pervasive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 11, 2005 at 03:42:38PM -0500, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > It seems to me that it has always been implicitly assumed around here
> > that the MERGE command would be a substitute for a MySQL-like REPLACE
> > functionality. After rereading the spec it seems that this is not the
> > case. MERGE always operates on two different tables, which REPLACE
> > doesn't do.
>
> Normally I'd plump for following the standard ... but AFAIR, we have had
> bucketloads of requests for REPLACE functionality, and not one request
> for spec-compatible MERGE. If, as it appears, full-spec MERGE is also a
> whole lot harder and slower than REPLACE, it seems that we could do
> worse than to concentrate on doing REPLACE for now. (We can always come
> back to MERGE some other day.)
I suspect a lot of those requests are from people who actually want
merge and don't realize that mysql has a replace.
On another note, is there any reason we can't put an equivalent to
example 36-1 (http://lnk.nu/postgresql.org/617.html) into the backend?
Presumably it wouldn't be as fast as a more elegant solution, but OTOH
it'd probably be faster than plpgsql...
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2005-11-14 20:34:56 | Re: MERGE vs REPLACE |
Previous Message | Jim C. Nasby | 2005-11-14 20:24:07 | Re: MERGE vs REPLACE |