Subject inconsistent RETURNING syntax
Author johnporteous@rocketmail.com
I have used the RETURNING parameter in a number of cases where I was looking to return the value of an index created by a generator.
eg 'INSERT INTO TABLEX (xx,yy,zz) VALUES (xx,yyy,zzz) RETURNING (aa)'

This has always worked, whether entered through code or IBExpret.

I recently needed a similar SQL where I wanted to return 2 table values and extended the above to
'INSERT INTO TABLEX (xx,yy,zz) VALUES (xx,yyy,zzz) RETURNING (aa,bb)'
this failed on the comma in the RETURNING clause. A quick Google shows that Firebird is expecting
'INSERT INTO TABLEX (xx,yy,zz) VALUES (xx,yyy,zzz) RETURNING aa,bb'
ie without the brackets around the RETURNING parameters.
In practice for a single parameter the stament is accepted with or without the brackets, but for multiple it only accepts the statement without.
This seems inconsistent with the general format which requires brackets for the field names, VALUES & MATCHING.