Re: [sqlite] UPSERT fails for unique partial index

2018-08-14 Thread Jordan Owens
Awesome, thanks! On Tue, Aug 14, 2018 at 11:16 AM Richard Hipp wrote: > On 8/14/18, Richard Hipp wrote: > > I will strive to bring the behavior of SQLite into > > alignment with PostgreSQL. > > Now fixed on trunk > > -- > D. Richard Hipp > d...@sqlite.org >

[sqlite] UPSERT on constraint name instead of conflict target

2018-08-14 Thread Jordan Owens
Hi, In reviewing the documentation for UPSERT, it does not appear that it fully supports the PostgreSQL syntax. PostgreSQL provides an option to use the name of a constraint instead of a list of columns or index expressions. For example: CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT, c INT, d INT

[sqlite] UPSERT fails for unique partial index

2018-08-14 Thread Jordan Owens
Hello, I believe I have discovered a bug with UPSERT when a table has a unique partial index. I'm getting a constraint exception instead of the database updating the record. SQLite v3.24.0 *Error message:* SQLite3::ConstraintException: UNIQUE constraint failed: alarms.id: INSERT INTO "alarms"("