> Le 19 mars 2018 à 11:28, R Smith <[email protected]> a écrit :
>
> On 2018/03/19 10:36 AM, Paul wrote:
>> Fort me personally, the most sad thing is an annoyance. Because I have to
>> maintain two almost identical queries and manually tweak strategies.
>
> I think that there presents the entire UPSERT argument's only real
> motivation, because it really is negligible from a Database performance point
> of view. Never the less, many a lazy programmer do yearn for it (I don't
> specifically need it, but I am a lazy programmer too, and probably would use
> it if it existed!), and it seems trivial to implement db-side.
>
> We keep going in circles between those of us explaining why it's not really
> better and those of us who really feel warranted in asking for it.
>
> I never see a dev speak up on this - Is there any dev thoughts on why this
> isn't considered yet?
>
> I mean, do we keep lobbying for it, or is there a reason we should all just
> drop it (and that we might explain to the next person coming on here and
> asking for it)?.
I don't know what any 'standard' SQL defines about this.
I know that FirebirdSQL (where I came from, before meeting SQLite) did/does it
this way:
UPDATE OR INSERT INTO
{tablename | viewname} [(<columns>)]
VALUES (<values>)
[MATCHING (<columns>)]
[RETURNING <values> [INTO <variables>]]
Setting aside the RETURNING option and also its INTO clause only meant for
stored procedures, clearly the syntax UPDATE OR INSERT gets its feet on SQLite
UPDATE OR ROLLBACK/ABORT/REPLACE/FAIL/IGNORE construction which have absolutely
not the same kind of semantic attached to them (these are conflict resolutions
on verb UPDATE). This probably complicates things significantly, and tend to
weight on the 'Lite' part of the name 'SQLite'.
I would have like to have it in SQLite at some point in past time (would have
made the transition easier), though learned easily to live without it. :)
--
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users