Re: [sqlite] Is this an SQL parsing / ambiguity bug ?

2020-03-10 Thread Richard Hipp
On 3/10/20, Simon Slavin  wrote:
> On 9 Mar 2020, at 8:40pm, Vladimir Vysotsky  wrote:
>
>> sqlite> insert into dst(id) select id from src on conflict do nothing;
>> Error: near "do": syntax error
>
> SQLite does not understand "DO NOTHING".  You probably want "ON CONFLICT
> IGNORE".

I think Vlad is trying to do an upsert, which does have a DO NOTHING
syntax that I copied from postgres.

The parsing ambiguity that Vlad is complaining about (if I understand
him correctly) is documented at the bottom of the upsert page:
https://www.sqlite.org/lang_UPSERT.html#parseambig

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is this an SQL parsing / ambiguity bug ?

2020-03-10 Thread Simon Slavin
On 9 Mar 2020, at 8:40pm, Vladimir Vysotsky  wrote:

> sqlite> insert into dst(id) select id from src on conflict do nothing;
> Error: near "do": syntax error

SQLite does not understand "DO NOTHING".  You probably want "ON CONFLICT 
IGNORE".


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users