SQLite Forum

Custom error messages for required table-valued function parameter
The preferred technique for enforcing required arguments for table-valued
functions is now documented in the version 3.37.0 draft documentation.
There is nothing new in SQLite to provide this capability - only the documentation
has been changed.  So the technique described should work just as well in
historical versions of SQLite as it does in (currently unreleased) 3.37.0.

See the [current documentation draft][1] for details.

[1]: https://www.sqlite.org/draft/vtab.html#enforcing_required_parameters_on_table_valued_functions

Note that the loadable-extension that implements the [generate_series()][2]
table-valued function has been updated to make its first parameter required,
in order to illustrate the techniques described above.  The changes to
generate_series() are not in the current release and will appear with version

[2]: https://www.sqlite.org/draft/series.html