3 ms·
This is a cool idea, I'm glad someone poasted it here. However, SQLite3 on the Mac gave me: Error: near line 2: no such table: pragma_table_list Somewhere
by jll29 3y ago
This is a cool idea, I'm glad someone poasted it here.
However, SQLite3 on the Mac gave me:
Error: near line 2: no such table: pragma_table_list
Somewhere it is written that pragma_table_list was only made available as of 3.16, but I am actually using
sqlite --version
3.35.4 2021-04-02 15:20:15 5d4c65779dab868b285519b19e4cf9d451d50c6048f06f653aa701ec212df45e
Anyone seen this?
- martinsnow 3y agoInstall a newer version
- codetrotter 3y agoAre you using SQLite that ships with macOS, or SQLite installed from homebrew? I had a different problem in the past with the SQLite that ships with macOS, and have been using SQLite from homebrew since. So if it’s the one that comes with macOS that gives you this problem that you are having, try using SQLite from homebrew instead. https://brew.sh/ https://brew.sh/
- pmarreck 3y agorun `which sqlite`
- zoomablemind 3y agoHad this error with v3.33. Does work with sqlite3 v3.40 and likely higher too.
- thristian 3y agoThanks for looking into it! It turns out that 3.37.0 is the version that added the `table_list` pragma. I've added that requirement to the README.
- thristian 3y agoI have not seen that, and that's very puzzling. What output do you get when you run these commands? $ sqlite3 --version -- Loading resources from /home/st/.sqliterc 3.45.1 2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257ccalt1 (64-bit) $ sqlite3 :memory: -init /dev/null "select * from pragma_table_list();" -- Loading resources from /dev/null main|sqlite_schema|table|5|0|0 temp|sqlite_temp_schema|table|5|0|0 EDIT: The ability to use pragmas as table-valued functions was added in version 3.16.0[1], but the table_list pragma was first added in 3.37.0[2], which is newer than your sqlite3 version. [1]: https://sqlite.org/changes.html#version_3_16_0 https://sqlite.org/changes.html#version_3_16_0 [2]: https://sqlite.org/changes.html#version_3_37_0 https://sqlite.org/changes.html#version_3_37_0