SQLite Forum

Pragma_Function_List()
Login
The flags column is an internal implementation detail and is subject to change.
But a few of the bits are fixed.  From sqlite3.h:

> ~~~~
#define SQLITE_DETERMINISTIC    0x000000800
#define SQLITE_DIRECTONLY       0x000080000
#define SQLITE_SUBTYPE          0x000100000
#define SQLITE_INNOCUOUS        0x000200000
~~~~

Thus, for example, to see a list of all functions that are not allowed to
be used inside of triggers and views (SQLITE_DIRECTONLY functions) you
could write:

> ~~~~
SELECT DISTINCT name
  FROM pragma_function_list
 WHERE flags & 0x80000
 ORDER BY name;
~~~~

And this gives you:

> ~~~~
┌────────────────────┐
│        name        │
├────────────────────┤
│ fts3_tokenizer     │
│ geopoly_debug      │
│ icu_load_collation │
│ load_extension     │
│ readfile           │
│ sha3_query         │
│ writefile          │
└────────────────────┘
~~~~