nuts. that makes INSERT OR REPLACE worthless if you have tables  
dependent on one another.


Is there any way to manually get a list of records for which there  
would be a conflict if a given record was inserted?


> On Fri, 03 Jul 2009 11:29:14 -0700, James Gregurich
> <bayouben...@mac.com> wrote:
>
> >
> >based on my reading of the docs for INSERT OR REPLACE, it will delete
> >rows for ANY constraint violation, not just one involving the primary
> >key. Is that reading wrong?
>
> You are right, for UNIQUE constraint violations.
>
> Indeed it breaks referential integrity, because the new row
> can contain a new value for the primary key, without
> cascading deletes or updates concerning the old value.
>
> My conclusion: syntax shortcuts like INSERT OR REPLACE are
> evil ;)
>
> >-James
> -- 
>   (  Kees Nuyt
>   )
> c[_]

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

Reply via email to