Dear Richard, Simon, SQLiters,

I hope you did not take my comment to mean that my stupid solution outsmarts 
your smart solution. I wanted to say that my work is not delayed and that I am 
trying within the tools/knowledge I have to solve my problems.

Substantially, I would like to understand if CAST() modification that you 
propose should actually be the correct SQL code that I should adopt permanetly. 
We like implicit conversions, but as C++ is more strict than C with regard to 
casting, should it be my better practice to always explicitly cast?

Thank you,

Roman

________________________________
From: Roman Fleysher
Sent: Tuesday, May 19, 2015 3:48 PM
To: General Discussion of SQLite Database
Subject: RE: [sqlite] index broken by insert

Dear Richard,
Dear Simon,
Dear SQLiters,

It is such a pleasure to deal with smart people. Pure joy. How quickly Simon 
figured out the problem and how Richard narrowed it down and fixing it.

Thank you for the work around. I implemented my own,  stupid,  work around: 
execute offending  insert using 5 year old version of sqlite that we have on 
our system.

How will i know the patch/new version is available? By checking ticket link?

Thank you,

Roman


Sent from my T-Mobile 4G LTE Device


-------- Original message --------
From: Richard Hipp <d...@sqlite.org>
Date: 05/19/2015 3:37 PM (GMT-05:00)
To: General Discussion of SQLite Database <sqlite-users at 
mailinglists.sqlite.org>
Subject: Re: [sqlite] index broken by insert

On 5/19/15, Roman Fleysher <roman.fleysher at einstein.yu.edu> wrote:
> CREATE TRIGGER demographicInsert AFTER INSERT ON subject FOR EACH ROW BEGIN
>   INSERT INTO Exam (subjectID, examID, examType) VALUES (NEW.subjectID,
> NEW.subjectID, 'demographicExam');

Your workaround is to change the insert into examID to cast it to type
TEXT.  Like this:

    .. VALUES(New.subjectID, CAST(New.subjectID AS TEXT), 'demographicExam');

This should be automatic.  We are testing the bug fix now.  The
work-around is simply to get you going until we can get a patch
release out.

>   INSERT INTO wave (subjectID, examType, waveID, examID) VALUES
> (NEW.subjectID, 'demographicExam', 'time1', NEW.subjectID);
> END;
>

--
D. Richard Hipp
drh at sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to