Brandon Wang <wa...@broadcom.com> wrote:
> I've come upon a interesting scenerio.
> 
> .sqlite> .schema rg_configuration
> CREATE TABLE 'rg_configuration' (
>    "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
>    "configurationName" TEXT NOT NULL,
>    "host" TEXT,
>    "user" TEXT,
>    "parentArch" INTEGER NOT NULL,
>    "parentJob" INTEGER NOT NULL,
>    "parentSubblock" INTEGER NOT NULL,
>    "parentBlock" INTEGER NOT NULL,
>    "canBeRun" INTEGER DEFAULT (1)
> );
> [Addititonal indices, triggers, etc. here]
> 
> One of my scripts attempts to execute the following:
> 
> INSERT INTO main.rg_configuration (configurationName, parentArch,
> parentJob, parentSubblock, parentBlock, canBeRun) VALUES
> ('full_chip.nofeedthru', 9565, 3014, 33, 8, 1);  
> 
> Upon which I get the error:
> 
> SQL error: PRIMARY KEY must be unique
> 
> I'm not specifying the primary key, id. Is there some error on my
> part? 

My guess is, you have an INSERT trigger that does try to insert a duplicate, 
possibly into a different table.

Igor Tandetnik


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

Reply via email to