Re: Do we always have to update or insert? Why can't we just relate?

From: Gene Wirchenko <genew_at_ucantrade.com.NOTHERE>
Date: Mon, 17 Oct 2005 15:10:20 -0700
Message-ID: <d688l1he891jquv2jer90826t2t8kp3id3_at_4ax.com>


On 17 Oct 2005 11:42:16 -0700, "BTDT" <dcressey_at_detma.org> wrote:

>I don't think you understood Marshall's suggestion.
>
>M isn't saying it should insert a duplicate row. He's just saying that
>it's unnecessary to report an error, if the row to be inserted is
>already there. No action is necessary. No insertion, because
>inserting would be an error. No error flag, because the row you
>wanted in the table is (already) in the table.

     I do not like the idea of lying to the programmer. Suppose the program counts the number of rows added as part of an audit trail. This would knock the count off by one.

     Having an option of ignoring certain return codes sounds rasonable though. That could be done with a wrapper around the insert though.

Sincerely,

Gene Wirchenko Received on Tue Oct 18 2005 - 00:10:20 CEST

Original text of this message