Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-07 Thread Kees Nuyt
On Mon, 6 Jul 2009 16:53:35 -0500, Nicolas Williams nicolas.willi...@sun.com wrote: On Sat, Jul 04, 2009 at 10:24:50AM +0200, Kees Nuyt wrote: On Fri, 03 Jul 2009 14:38:43 -0700, James Gregurich bayouben...@mac.com wrote: nuts. that makes INSERT OR REPLACE worthless if you have tables

Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-06 Thread Nicolas Williams
On Sat, Jul 04, 2009 at 10:24:50AM +0200, Kees Nuyt wrote: On Fri, 03 Jul 2009 14:38:43 -0700, James Gregurich bayouben...@mac.com wrote: 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

Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-06 Thread James Gregurich
based on the test I just ran, it reports the first one encountered only. On Jul 6, 2009, at 2:53 PM, Nicolas Williams wrote: On Sat, Jul 04, 2009 at 10:24:50AM +0200, Kees Nuyt wrote: On Fri, 03 Jul 2009 14:38:43 -0700, James Gregurich bayouben...@mac.com wrote: nuts. that makes INSERT OR

Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-04 Thread Kees Nuyt
On Fri, 03 Jul 2009 14:38:43 -0700, James Gregurich bayouben...@mac.com wrote: 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?

[sqlite] referential integrity and INSERT OR REPLACE

2009-07-03 Thread James Gregurich
question: How do I maintain referential integrity on a INSERT OR REPLACE given it does not call the delete trigger on the offending rows? thanks, james ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-03 Thread Kees Nuyt
On Thu, 02 Jul 2009 19:28:17 -0700, James Gregurich bayoubenga...@mac.com wrote: question: How do I maintain referential integrity on a INSERT OR REPLACE given it does not call the delete trigger on the offending rows? Please correct me if I'm wrong, but considering the two cases INSERT OR

Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-03 Thread James Gregurich
I read on another posting in the archives that it does not. However, I haven't tried it myself. -James Simon Slavin Fri, 03 Jul 2009 09:44:22 -0700 On 3 Jul 2009, at 3:28am, James Gregurich wrote: How do I maintain referential integrity on a INSERT OR REPLACE given it does not call

Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-03 Thread Kees Nuyt
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

Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-03 Thread James Gregurich
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: