On 3/1/07, Michael Radziej <[EMAIL PROTECTED]> wrote:
>
> Andy Dustman:
> > Here's another possible solution/workaround: MySQL supports an IGNORE
> > keyword on INSERT statements, which causes errors to be treated as
> > warnings.
> >
> > http://dev.mysql.com/doc/refman/5.0/en/insert.html
> >
> > Not sure how hard it would be to incorporate this for this particular
> > case, though.
>
> You're sure? The docs say:
>
> "Specify IGNORE to ignore rows that would cause duplicate-key violations."
>
> The rows are ignored, not the errors.
>
>
> I haven't tried it out, though.

Neither have I, but the passage quoted above refers to a specific case
with duplicate key errors. The problem here is not duplicate keys but
missing foreign keys, and so I'm hoping what it will do is insert the
row anyway and produce a warning. That is my interpretation of:

"If you use the IGNORE keyword, errors that occur while executing the
INSERT  statement are treated as warnings instead."

However, this needs to be tested, and even so, I'm not sure how hard
this is to do within the context of the code.

-- 
Patriotism means to stand by the country. It does
not mean to stand by the president. -- T. Roosevelt

This message has been scanned for memes and
dangerous content by MindScanner, and is
believed to be unclean.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to