Discussion:
[sqlite] Misleading error message on missing function
Dominique Devienne
2018-11-30 15:16:39 UTC
Permalink
sqlite> select json_each('[1, 3, 5]');
Error: no such function: json_each
sqlite> select * from json_each('[1,2]');
0|1|integer|1|1||$[0]|$
1|2|integer|2|2||$[1]|$

Misusing the json_each() table-values function as a regular function
yields a misleading (IMHO) "no such function" message, despite the
function (aka eponymous vtable) actually existing.

Any chance we might get a more user-friendly error message?
Like perhaps "Error: table-valued function not usable here: json_each"?

Thanks, --DD

PS: Does pragma function_list lists such table-valued functions?
Can't say easily, since not available in pre-built binary apparently.
Dominique Devienne
2018-12-04 09:08:33 UTC
Permalink
Post by Dominique Devienne
sqlite> select json_each('[1, 3, 5]');
Error: no such function: json_each
[...]
Any chance we might get a more user-friendly error message?
Like perhaps "Error: table-valued function not usable here: json_each"?
ping.

Continue reading on narkive:
Loading...