Thanks for the clever ideas. In my case I figured it out by hand (it was a
trigger which was inserting a row with a foreign key into another table
that no longer existed). But I will make use of those strategies in the
future.
On Tue, May 9, 2017 at 11:54 PM, Gwendal Roué
There is a way, but it requires some effort:
First let's define a schema that reproduces your error:
CREATE TABLE t1 (
id INTEGER PRIMARY KEY);
CREATE TABLE t2 (
id INTEGER PRIMARY KEY,
id1 INTEGER REFERENCES t1(id) ON DELETE RESTRICT);
INSERT INTO t1 (id) VALUES
On Wed May 10, 2017 at 08:34:42AM +0200, Clemens Ladisch wrote:
> Mark Wagner wrote:
> > Is there a way to get sqlite to tell which foreign key constraint is
> > causing a failure?
>
> No; to make the implementation of deferred constraints easier, it keeps
> track only of the number of remaining
Mark Wagner wrote:
> Is there a way to get sqlite to tell which foreign key constraint is
> causing a failure?
No; to make the implementation of deferred constraints easier, it keeps
track only of the number of remaining foreign key failures, not of their
origin.
Regards,
Clemens
Is there a way to get sqlite to tell which foreign key constraint is
causing a failure? Some kind of verbose mode?
Thanks!
sqlite> delete from t;
Error: FOREIGN KEY constraint failed
sqlite>
___
sqlite-users mailing list
5 matches
Mail list logo