Misleading error message on missing function

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Misleading error message on missing function

Dominique Devienne
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.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Misleading error message on missing function

Dominique Devienne
On Fri, Nov 30, 2018 at 4:16 PM Dominique Devienne <[hidden email]>
wrote:

> 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.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users