On Nov 16, 2013, at 11:02 PM, Kees Nuyt <k.n...@zonnet.nl> wrote:

> For the application, the merge would look like a single
> INSERT INTO merge_t statement.

Hmmmm…. clever lateral thinking, but I doubt this will fly in practice :)

Two main issues:

(1) ‘or ignore’ is most likely inappropriate as unrelated constraint violations 
will trigger it (e.g. null constraint). Resulting in a no-op altogether as 
neither insert nor update will do anything in practice. Leading to loss of data.

(2) Both insert & update statement will execute irrespectively of the state of 
the data, doubling the workload.

And, really, at this point (additional views, instead of triggers, highjacking 
of DML semantics, silent loss of data), the cure might seem worst than the 
disease.

As far as I can tell, there is no way to reasonably emulate MERGE in SQLite, 
short of resorting to some external programming logic. 


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to