I'm trying to work with the SQLite CLI, and I can't get the generate_series
function to work. I can simulate it with the recursive CTE, as suggested in the documentation, but I can't seem to get any of the examples in that link to work. Here's some output from my session:
sqlite> with recursive generate_series(value) as (
select 1
union all select value+1
from generate_series
where value+1<=3)
select value from generate_series;
1
2
3
sqlite> select value from generate_series;
Error: no such table: generate_series
sqlite> select value from generate_series(1,3,1);
Error: no such table: generate_series
It seems like the ext/misc/series.c
extension is not actually being statically linked. I also don't know how to do that if I compile from scratch. Am I doing something wrong here?
Edit Until how to compile an extension into SQLite has a good answer, I don't think I'll be able to do what I want. The documentation is wrong: the extension is not build into the command line shell by default.