Subject Re: [Firebird-Architect] REPLACE, again
Author Dmitry Yemanov
"Adriano dos Santos Fernandes" <adrianosf@...> wrote:
> Last time we discussed REPLACE if fb-devel, one user suggested another
> syntax that's looking better for me:
> REPLACE INTO <table> [(<field_list>)] VALUES (<value_list>) MATCHING
> (<field_list>) [RETURNING <value_list>]

I like it.

> As we don't support RETURNING more than one row yet, the generated RSE
> of the update will be a singleton (only when RETURNING is used?).

The decision re. INSERT SELECT RETURNING was to force the RSE being
singleton (and thus throwing a runtime error for multiple rows), it just was
never implemented (mostly because we have problems with UPDATE/DELETE
RETURNING and because our major intention was to address the mostly used
pattern first and extend the feature later). So, although I also see some
sense in Alex's position, I have no objections to REPLACE behaving the same
way as we wanted INSERT to behave.