Re: [sqlite] INSERT OR IGNORE with rtree virtual tables

2010-11-08 Thread Dan Kennedy
>> In the shell:
>>
>> SQLite version 3.7.3
>> Enter ".help" for instructions
>> Enter SQL statements terminated with a ";"
>> sqlite> CREATE VIRTUAL TABLE a_rt USING rtree( _id, min_x, max_x,
>> min_y, max_y );
>> sqlite> INSERT OR IGNORE INTO a_rt ( _id, min_x, max_x, min_y,  
>> max_y )
>> VALUES( 2, 3, 4, 5, 6 );
>> sqlite> INSERT OR IGNORE INTO a_rt ( _id, min_x, max_x, min_y,  
>> max_y )
>> VALUES( 2, 3, 4, 5, 6 );
>> Error: constraint failed
>> sqlite>
>>
>> Is this a bug, or operating as designed?

Virtual tables (like r-tree and fts3) ignore ON CONFLICT
clauses. Just the way it is unfortunately.

Dan.


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



Re: [sqlite] INSERT OR IGNORE with rtree virtual tables

2010-11-07 Thread Peter Kolbus
Any thoughts on this?

Thanks,
Peter Kolbus

On Sat, Oct 30, 2010 at 8:27 PM, Peter Kolbus  wrote:
> Hi,
>
> It seems that the OR IGNORE clause is not working with an RTREE
> virtual table.  The documentation (http://sqlite.org/rtree.html,
> section 3.2) implies that this should work, but is not absolutely
> clear on the point of conflict handling.  I've tried this with both
> 3.6.19 and 3.7.3 with the same result.
>
> In the shell:
>
> SQLite version 3.7.3
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> CREATE VIRTUAL TABLE a_rt USING rtree( _id, min_x, max_x,
> min_y, max_y );
> sqlite> INSERT OR IGNORE INTO a_rt ( _id, min_x, max_x, min_y, max_y )
> VALUES( 2, 3, 4, 5, 6 );
> sqlite> INSERT OR IGNORE INTO a_rt ( _id, min_x, max_x, min_y, max_y )
> VALUES( 2, 3, 4, 5, 6 );
> Error: constraint failed
> sqlite>
>
> Is this a bug, or operating as designed?
>
> Thanks,
> Peter Kolbus
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users