SQLite Forum

PRAGMAs as functions ?
Login
Does SQLite provide read access to (some/most/which) PRAGMAs?

I'm specifically interested in user_version with a secondary interest in other informational functions e.g.

```
sqlite> select user_version();
Error: no such function: user_version
sqlite> select data_version();
Error: no such function: data_version
sqlite> select application_id();
Error: no such function: application_id
sqlite> select page_size();
Error: no such function: page_size
sqlite> select cache_size();
Error: no such function: cache_size
```

plus statistics via `sqlite3_config` options per https://www.sqlite.org/c3ref/c_config_covering_index_scan.html

(which for some inexplicable reason are doc'd on the webpage named c_config_covering_index_scan.html)

Perhaps there's a compile option I've overlooked? Running with...

```
sqlite> pragma compile_options;
compile_options
COMPILER=gcc-5.2.0
ENABLE_DBSTAT_VTAB
ENABLE_FTS3
ENABLE_FTS5
ENABLE_JSON1
ENABLE_RTREE
ENABLE_STMTVTAB
ENABLE_UNKNOWN_SQL_FUNCTION
THREADSAFE=0
```