The .import command in sqlite3 chokes on CHECK constraints consisting of
typeof.  Is it intentional?  

$ sqlite3 -echo -header  :memory: < demo/typeof.sql 
create table T (t int not null);
insert into T values (1);
.system echo 2 > T
.system nl T
     1  2
.import 'T' T
select * from T;
t
1
2
drop table T;
-- repeat with constraint
create table T (t int not null check (typeof(t) = 'integer') );
insert into T values (1);
.import 'T' T
T:1: INSERT failed: CHECK constraint failed: T
select * from T;
t
1
drop table T;

For the record, .import does honor 

        pragma ignore_check_constraints = on;

The above script "works" when it begins with that line. 

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

Reply via email to