It turns out that RETURNING is not a reserved word, which allows
statements like:
```
SQL> create table returning (returning boolean);
SQL> insert into returning (returning) values (true) returning returning
returning;
RETURNING
=========
<true>
SQL> update returning set returning = not returning where returning
returning returning returning;
RETURNING
=========
<false>
```
I had hoped to make a very simple parser to detect the presence of a
RETURNING clause, but the possibility of having columns and expressions
containing RETURNING makes that a lot harder :(. Alternatively, I will
just need to ignore this, and for example detect a `UPDATE ... WHERE
RETURNING` as having a RETURNING clause.
For context, this would be used in Jaybird to replace a slightly more
complicated parser with a third-party dependency I want to get rid of.
Why is RETURNING not a reserved word?
Mark
--
Mark Rotteveel
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel