Subject Re: [Firebird-Architect] REPLACE, again
Author Alex Peshkov
Adriano dos Santos Fernandes wrote:
> Without MATCHING, a new BLR verb will be required to create a dependency
> on the PK.
> Initial implementation was proved that is much better to create the RSE
> in DSQL instead of in the engine.
> And then what this new verb will do, only to store that dependency?
>
> Or maybe generate a blr_plan with the PK index in the RSE?
>
> Anyway, isn't a singleton RSE sufficient for a MATCHING...RETURNING for now?
>

I think that before talking about implementation details it's good to
decide what we want from that implementation.

An example:

create table t(f1 int, f2 int, f3 int);
commit;
insert into t values(1, 2, 2);
insert into t values(1, 3, 3);
REPLACE INTO t(f1, f2) VALUES(1, 4) MATCHING(f1) RETURNING(f1, f2, f3);

What will be returned in singleton case - 1,4,2 or 1,4,3 ?