Subject | Re: [Firebird-Architect] REPLACE, again |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2006-08-17T11:38:39Z |
Alex Peshkov wrote:
Implement both in DSQL.
REPLACE using combination of update / if row_count / insert.
MERGE using joined cursor / update / insert.
BTW, I don't know if we can support MERGE using the same table twice
(MERGE as REPLACE).
It's a kind of INSERT INTO table SELECT FROM table.
Adriano
> Yes, we need to be as standard compliant as possible.Yes.
>
> But nothing prevents us from having non-standard extensions, if we find
> that they make life better. I suppose that REPLACE via MERGE is such
> extension, is not it?
>
> Ideally we should support MERGE in all it's complexity, and as soon asThat is the idea.
> we are able to compile REPLACE using that same execution tree, it will
> become fine extension of SQL language, making life easier in trivial
> cases, when full MERGE capabilities are not required. But (returning to
> our initial problem) RETURNING clause is not present now in MERGE
> specification - at least I don't see it in both Oracle docs or available
> to me form of sql2003. But nothing prevents us from having it! In the
> future.
>
> If right now any developer wants to implement REPLACE, not MERGE, I see
> no problems. But please make it possible to use that same parts of code
> - BLR, execution tree node(s), etc. - later in MERGE.
>
Implement both in DSQL.
REPLACE using combination of update / if row_count / insert.
MERGE using joined cursor / update / insert.
BTW, I don't know if we can support MERGE using the same table twice
(MERGE as REPLACE).
It's a kind of INSERT INTO table SELECT FROM table.
Adriano