Subject Re: [Firebird-Architect] REPLACE, again
Author Adriano dos Santos Fernandes
Alex Peshkov wrote:
> This old trick when singleton is checked at runtime is very bad (it
> often fails in procedures, that seemed to work for a long time, but
> start to fail after specific data modification). Taking into account,
> that REPLACE is supposed to be often used in database update/upgrade
> scripts, I very much dislike run-time checks there, because fixing such
> bugs in such scripts is specially problematic - REPLACE may pass on test
> data in test environment, but fail on real user's data, in the worst
> case leaving production database in unstable state.
>
> I suggest to do as much compile-time checks as possible, and not leave
> them for run-time. Specially in cases, when pass/fail may depend upon
> data in tables. When we will be ready RETURNING multiple rows - OK, no
> problems. Now your suggestion adds one more dangerous place to the engine.
>
Although not totally agree, I understand your points.

But if it's to have non MATCHING syntax, then let's have only it for now
and add MATCHING when we can return result set.


Adriano