Subject Returning generated key was Re: [Firebird-Architect] Re: Indexed Views
Author Roman Rokytskyy
> > What gets returned for a mass insert?
>
> It should generate an error.

Why? Why cannot one use

INSERT INTO myTable(id, name)
SELECT gen_id(myGen, 1), name FROM (
SELECT DISTINCT name FROM students)
RETURNING id;

The only problem is to correctly describe it in
isc_dsql_describe_bind, so the result set is returned.

I think the answer should come from developers: if there is clean way
to implement handling of INSERT that returns result set, not a
singleton result, we can consider it. If implementing it would require
some dirty hack in the engine, we wait till better times come.

Roman