Subject | Re: [Firebird-Architect] REPLACE, again |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2006-08-16T17:32:01Z |
Alex Peshkov wrote:
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
> This old trick when singleton is checked at runtime is very bad (itAlthough not totally agree, I understand your points.
> 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.
>
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