SQLite Forum

SQL to return list of PRAGMAs
Login
You could have your application retrieve the names of the pragma's, remove the ones you don't want to run from the list, then execute the pragma and collect the results:

```
pragma_list = [[row[0], None] for row in db.cursor().execute('pragma pragma_list')]
for e in pragma_list:
   if not e[0] in ['foreign_key_check', 'integrity_check', 'quick_check' ]:
      try:
         e[1] = db.cursor().execute('pragma ' + e[0]).fetchone()[0]
      except:
         pass
```

after which the list pragma_list will contain a list of all pragma's together with the result obtained from running that pragma.