Home | History | Annotate | Line # | Download | only in man
      1 .Dd April 29, 2026
      2 .Dt SQLITE_CONFIG_SINGLETHREAD 3
      3 .Os
      4 .Sh NAME
      5 .Nm SQLITE_CONFIG_SINGLETHREAD ,
      6 .Nm SQLITE_CONFIG_MULTITHREAD ,
      7 .Nm SQLITE_CONFIG_SERIALIZED ,
      8 .Nm SQLITE_CONFIG_MALLOC ,
      9 .Nm SQLITE_CONFIG_GETMALLOC ,
     10 .Nm SQLITE_CONFIG_SCRATCH ,
     11 .Nm SQLITE_CONFIG_PAGECACHE ,
     12 .Nm SQLITE_CONFIG_HEAP ,
     13 .Nm SQLITE_CONFIG_MEMSTATUS ,
     14 .Nm SQLITE_CONFIG_MUTEX ,
     15 .Nm SQLITE_CONFIG_GETMUTEX ,
     16 .Nm SQLITE_CONFIG_LOOKASIDE ,
     17 .Nm SQLITE_CONFIG_PCACHE ,
     18 .Nm SQLITE_CONFIG_GETPCACHE ,
     19 .Nm SQLITE_CONFIG_LOG ,
     20 .Nm SQLITE_CONFIG_URI ,
     21 .Nm SQLITE_CONFIG_PCACHE2 ,
     22 .Nm SQLITE_CONFIG_GETPCACHE2 ,
     23 .Nm SQLITE_CONFIG_COVERING_INDEX_SCAN ,
     24 .Nm SQLITE_CONFIG_SQLLOG ,
     25 .Nm SQLITE_CONFIG_MMAP_SIZE ,
     26 .Nm SQLITE_CONFIG_WIN32_HEAPSIZE ,
     27 .Nm SQLITE_CONFIG_PCACHE_HDRSZ ,
     28 .Nm SQLITE_CONFIG_PMASZ ,
     29 .Nm SQLITE_CONFIG_STMTJRNL_SPILL ,
     30 .Nm SQLITE_CONFIG_SMALL_MALLOC ,
     31 .Nm SQLITE_CONFIG_SORTERREF_SIZE ,
     32 .Nm SQLITE_CONFIG_MEMDB_MAXSIZE ,
     33 .Nm SQLITE_CONFIG_ROWID_IN_VIEW
     34 .Nd configuration options
     35 .Sh SYNOPSIS
     36 .In sqlite3.h
     37 .Fd #define SQLITE_CONFIG_SINGLETHREAD
     38 .Fd #define SQLITE_CONFIG_MULTITHREAD
     39 .Fd #define SQLITE_CONFIG_SERIALIZED
     40 .Fd #define SQLITE_CONFIG_MALLOC
     41 .Fd #define SQLITE_CONFIG_GETMALLOC
     42 .Fd #define SQLITE_CONFIG_SCRATCH
     43 .Fd #define SQLITE_CONFIG_PAGECACHE
     44 .Fd #define SQLITE_CONFIG_HEAP
     45 .Fd #define SQLITE_CONFIG_MEMSTATUS
     46 .Fd #define SQLITE_CONFIG_MUTEX
     47 .Fd #define SQLITE_CONFIG_GETMUTEX
     48 .Fd #define SQLITE_CONFIG_LOOKASIDE
     49 .Fd #define SQLITE_CONFIG_PCACHE
     50 .Fd #define SQLITE_CONFIG_GETPCACHE
     51 .Fd #define SQLITE_CONFIG_LOG
     52 .Fd #define SQLITE_CONFIG_URI
     53 .Fd #define SQLITE_CONFIG_PCACHE2
     54 .Fd #define SQLITE_CONFIG_GETPCACHE2
     55 .Fd #define SQLITE_CONFIG_COVERING_INDEX_SCAN
     56 .Fd #define SQLITE_CONFIG_SQLLOG
     57 .Fd #define SQLITE_CONFIG_MMAP_SIZE
     58 .Fd #define SQLITE_CONFIG_WIN32_HEAPSIZE
     59 .Fd #define SQLITE_CONFIG_PCACHE_HDRSZ
     60 .Fd #define SQLITE_CONFIG_PMASZ
     61 .Fd #define SQLITE_CONFIG_STMTJRNL_SPILL
     62 .Fd #define SQLITE_CONFIG_SMALL_MALLOC
     63 .Fd #define SQLITE_CONFIG_SORTERREF_SIZE
     64 .Fd #define SQLITE_CONFIG_MEMDB_MAXSIZE
     65 .Fd #define SQLITE_CONFIG_ROWID_IN_VIEW
     66 .Sh DESCRIPTION
     67 These constants are the available integer configuration options that
     68 can be passed as the first argument to the
     69 .Fn sqlite3_config
     70 interface.
     71 .Pp
     72 Most of the configuration options for sqlite3_config() will only work
     73 if invoked prior to
     74 .Fn sqlite3_initialize
     75 or after
     76 .Fn sqlite3_shutdown .
     77 The few exceptions to this rule are called "anytime configuration options".
     78 Calling
     79 .Fn sqlite3_config
     80 with a first argument that is not an anytime configuration option in
     81 between calls to
     82 .Fn sqlite3_initialize
     83 and
     84 .Fn sqlite3_shutdown
     85 is a no-op that returns SQLITE_MISUSE.
     86 .Pp
     87 The set of anytime configuration options can change (by insertions
     88 and/or deletions) from one release of SQLite to the next.
     89 As of SQLite version 3.42.0, the complete set of anytime configuration
     90 options is:
     91 .Bl -bullet
     92 .It
     93 SQLITE_CONFIG_LOG
     94 .It
     95 SQLITE_CONFIG_PCACHE_HDRSZ
     96 .El
     97 .Pp
     98 New configuration options may be added in future releases of SQLite.
     99 Existing configuration options might be discontinued.
    100 Applications should check the return code from
    101 .Fn sqlite3_config
    102 to make sure that the call worked.
    103 The
    104 .Fn sqlite3_config
    105 interface will return a non-zero error code if a discontinued
    106 or unsupported configuration option is invoked.
    107 .Bl -tag -width Ds
    108 .It SQLITE_CONFIG_SINGLETHREAD
    109 There are no arguments to this option.
    110 This option sets the threading mode to Single-thread.
    111 In other words, it disables all mutexing and puts SQLite into a mode
    112 where it can only be used by a single thread.
    113 If SQLite is compiled with the SQLITE_THREADSAFE=0
    114 compile-time option then it is not possible to change the threading mode
    115 from its default value of Single-thread and so
    116 .Fn sqlite3_config
    117 will return SQLITE_ERROR if called with the SQLITE_CONFIG_SINGLETHREAD
    118 configuration option.
    119 .It SQLITE_CONFIG_MULTITHREAD
    120 There are no arguments to this option.
    121 This option sets the threading mode to Multi-thread.
    122 In other words, it disables mutexing on database connection
    123 and prepared statement objects.
    124 The application is responsible for serializing access to database connections
    125 and prepared statements.
    126 But other mutexes are enabled so that SQLite will be safe to use in
    127 a multi-threaded environment as long as no two threads attempt to use
    128 the same database connection at the same time.
    129 If SQLite is compiled with the SQLITE_THREADSAFE=0
    130 compile-time option then it is not possible to set the Multi-thread
    131 threading mode and
    132 .Fn sqlite3_config
    133 will return SQLITE_ERROR if called with the SQLITE_CONFIG_MULTITHREAD
    134 configuration option.
    135 .It SQLITE_CONFIG_SERIALIZED
    136 There are no arguments to this option.
    137 This option sets the threading mode to Serialized.
    138 In other words, this option enables all mutexes including the recursive
    139 mutexes on database connection and prepared statement
    140 objects.
    141 In this mode (which is the default when SQLite is compiled with SQLITE_THREADSAFE=1)
    142 the SQLite library will itself serialize access to database connections
    143 and prepared statements so that the application
    144 is free to use the same database connection or the
    145 same prepared statement in different threads at the
    146 same time.
    147 If SQLite is compiled with the SQLITE_THREADSAFE=0
    148 compile-time option then it is not possible to set the Serialized threading mode
    149 and
    150 .Fn sqlite3_config
    151 will return SQLITE_ERROR if called with the SQLITE_CONFIG_SERIALIZED
    152 configuration option.
    153 .It SQLITE_CONFIG_MALLOC
    154 The SQLITE_CONFIG_MALLOC option takes a single argument which is a
    155 pointer to an instance of the sqlite3_mem_methods
    156 structure.
    157 The argument specifies alternative low-level memory allocation routines
    158 to be used in place of the memory allocation routines built into SQLite.
    159 SQLite makes its own private copy of the content of the sqlite3_mem_methods
    160 structure before the
    161 .Fn sqlite3_config
    162 call returns.
    163 .It SQLITE_CONFIG_GETMALLOC
    164 The SQLITE_CONFIG_GETMALLOC option takes a single argument which is
    165 a pointer to an instance of the sqlite3_mem_methods
    166 structure.
    167 The sqlite3_mem_methods structure is filled with
    168 the currently defined memory allocation routines.
    169 This option can be used to overload the default memory allocation routines
    170 with a wrapper that simulates memory allocation failure or tracks memory
    171 usage, for example.
    172 .It SQLITE_CONFIG_SMALL_MALLOC
    173 The SQLITE_CONFIG_SMALL_MALLOC option takes a single argument of type
    174 int, interpreted as a boolean, which if true provides a hint to SQLite
    175 that it should avoid large memory allocations if possible.
    176 SQLite will run faster if it is free to make large memory allocations,
    177 but some applications might prefer to run slower in exchange for guarantees
    178 about memory fragmentation that are possible if large allocations are
    179 avoided.
    180 This hint is normally off.
    181 .It SQLITE_CONFIG_MEMSTATUS
    182 The SQLITE_CONFIG_MEMSTATUS option takes a single argument of type
    183 int, interpreted as a boolean, which enables or disables the collection
    184 of memory allocation statistics.
    185 When memory allocation statistics are disabled, the following SQLite
    186 interfaces become non-operational:
    187 .Bl -bullet
    188 .It
    189 .Fn sqlite3_hard_heap_limit64
    190 .It
    191 .Fn sqlite3_memory_used
    192 .It
    193 .Fn sqlite3_memory_highwater
    194 .It
    195 .Fn sqlite3_soft_heap_limit64
    196 .It
    197 .Fn sqlite3_status64
    198 .El
    199 .Pp
    200 Memory allocation statistics are enabled by default unless SQLite is
    201 compiled with SQLITE_DEFAULT_MEMSTATUS=0 in
    202 which case memory allocation statistics are disabled by default.
    203 .It SQLITE_CONFIG_SCRATCH
    204 The SQLITE_CONFIG_SCRATCH option is no longer used.
    205 .It SQLITE_CONFIG_PAGECACHE
    206 The SQLITE_CONFIG_PAGECACHE option specifies a memory pool that SQLite
    207 can use for the database page cache with the default page cache implementation.
    208 This configuration option is a no-op if an application-defined page
    209 cache implementation is loaded using the SQLITE_CONFIG_PCACHE2.
    210 There are three arguments to SQLITE_CONFIG_PAGECACHE: A pointer to
    211 8-byte aligned memory (pMem), the size of each page cache line (sz),
    212 and the number of cache lines (N).
    213 The sz argument should be the size of the largest database page (a
    214 power of two between 512 and 65536) plus some extra bytes for each
    215 page header.
    216 The number of extra bytes needed by the page header can be determined
    217 using SQLITE_CONFIG_PCACHE_HDRSZ.
    218 It is harmless, apart from the wasted memory, for the sz parameter
    219 to be larger than necessary.
    220 The pMem argument must be either a NULL pointer or a pointer to an
    221 8-byte aligned block of memory of at least sz*N bytes, otherwise subsequent
    222 behavior is undefined.
    223 When pMem is not NULL, SQLite will strive to use the memory provided
    224 to satisfy page cache needs, falling back to
    225 .Fn sqlite3_malloc
    226 if a page cache line is larger than sz bytes or if all of the pMem
    227 buffer is exhausted.
    228 If pMem is NULL and N is non-zero, then each database connection does
    229 an initial bulk allocation for page cache memory from
    230 .Fn sqlite3_malloc
    231 sufficient for N cache lines if N is positive or of -1024*N bytes if
    232 N is negative.
    233 If additional page cache memory is needed beyond what is provided by
    234 the initial allocation, then SQLite goes to
    235 .Fn sqlite3_malloc
    236 separately for each additional cache line.
    237 .It SQLITE_CONFIG_HEAP
    238 The SQLITE_CONFIG_HEAP option specifies a static memory buffer that
    239 SQLite will use for all of its dynamic memory allocation needs beyond
    240 those provided for by SQLITE_CONFIG_PAGECACHE.
    241 The SQLITE_CONFIG_HEAP option is only available if SQLite is compiled
    242 with either SQLITE_ENABLE_MEMSYS3 or SQLITE_ENABLE_MEMSYS5
    243 and returns SQLITE_ERROR if invoked otherwise.
    244 There are three arguments to SQLITE_CONFIG_HEAP: An 8-byte aligned
    245 pointer to the memory, the number of bytes in the memory buffer, and
    246 the minimum allocation size.
    247 If the first pointer (the memory pointer) is NULL, then SQLite reverts
    248 to using its default memory allocator (the system malloc() implementation),
    249 undoing any prior invocation of SQLITE_CONFIG_MALLOC.
    250 If the memory pointer is not NULL then the alternative memory allocator
    251 is engaged to handle all of SQLites memory allocation needs.
    252 The first pointer (the memory pointer) must be aligned to an 8-byte
    253 boundary or subsequent behavior of SQLite will be undefined.
    254 The minimum allocation size is capped at 2**12.
    255 Reasonable values for the minimum allocation size are 2**5 through
    256 2**8.
    257 .It SQLITE_CONFIG_MUTEX
    258 The SQLITE_CONFIG_MUTEX option takes a single argument which is a pointer
    259 to an instance of the sqlite3_mutex_methods structure.
    260 The argument specifies alternative low-level mutex routines to be used
    261 in place of the mutex routines built into SQLite.
    262 SQLite makes a copy of the content of the sqlite3_mutex_methods
    263 structure before the call to
    264 .Fn sqlite3_config
    265 returns.
    266 If SQLite is compiled with the SQLITE_THREADSAFE=0
    267 compile-time option then the entire mutexing subsystem is omitted from
    268 the build and hence calls to
    269 .Fn sqlite3_config
    270 with the SQLITE_CONFIG_MUTEX configuration option will return SQLITE_ERROR.
    271 .It SQLITE_CONFIG_GETMUTEX
    272 The SQLITE_CONFIG_GETMUTEX option takes a single argument which is
    273 a pointer to an instance of the sqlite3_mutex_methods
    274 structure.
    275 The sqlite3_mutex_methods structure is filled
    276 with the currently defined mutex routines.
    277 This option can be used to overload the default mutex allocation routines
    278 with a wrapper used to track mutex usage for performance profiling
    279 or testing, for example.
    280 If SQLite is compiled with the SQLITE_THREADSAFE=0
    281 compile-time option then the entire mutexing subsystem is omitted from
    282 the build and hence calls to
    283 .Fn sqlite3_config
    284 with the SQLITE_CONFIG_GETMUTEX configuration option will return SQLITE_ERROR.
    285 .It SQLITE_CONFIG_LOOKASIDE
    286 The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine
    287 the default size of lookaside memory on each database connection.
    288 The first argument is the size of each lookaside buffer slot ("sz")
    289 and the second is the number of slots allocated to each database connection
    290 ("cnt").
    291 SQLITE_CONFIG_LOOKASIDE sets the \fIdefault\fP lookaside size.
    292 The SQLITE_DBCONFIG_LOOKASIDE option to
    293 .Fn sqlite3_db_config
    294 can be used to change the lookaside configuration on individual connections.
    295 The -DSQLITE_DEFAULT_LOOKASIDE option can
    296 be used to change the default lookaside configuration at compile-time.
    297 .It SQLITE_CONFIG_PCACHE2
    298 The SQLITE_CONFIG_PCACHE2 option takes a single argument which is a
    299 pointer to an sqlite3_pcache_methods2 object.
    300 This object specifies the interface to a custom page cache implementation.
    301 SQLite makes a copy of the sqlite3_pcache_methods2
    302 object.
    303 .It SQLITE_CONFIG_GETPCACHE2
    304 The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which is
    305 a pointer to an sqlite3_pcache_methods2 object.
    306 SQLite copies off the current page cache implementation into that object.
    307 .It SQLITE_CONFIG_LOG
    308 The SQLITE_CONFIG_LOG option is used to configure the SQLite global
    309 error log.
    310 (The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a function
    311 with a call signature of void(*)(void*,int,const char*), and a pointer
    312 to void.
    313 If the function pointer is not NULL, it is invoked by
    314 .Fn sqlite3_log
    315 to process each logging event.
    316 If the function pointer is NULL, the
    317 .Fn sqlite3_log
    318 interface becomes a no-op.
    319 The void pointer that is the second argument to SQLITE_CONFIG_LOG is
    320 passed through as the first parameter to the application-defined logger
    321 function whenever that function is invoked.
    322 The second parameter to the logger function is a copy of the first
    323 parameter to the corresponding
    324 .Fn sqlite3_log
    325 call and is intended to be a result code or an extended result code.
    326 The third parameter passed to the logger is a log message after formatting
    327 via
    328 .Fn sqlite3_snprintf .
    329 The SQLite logging interface is not reentrant; the logger function
    330 supplied by the application must not invoke any SQLite interface.
    331 In a multi-threaded application, the application-defined logger function
    332 must be threadsafe.
    333 .It SQLITE_CONFIG_URI
    334 The SQLITE_CONFIG_URI option takes a single argument of type int.
    335 If non-zero, then URI handling is globally enabled.
    336 If the parameter is zero, then URI handling is globally disabled.
    337 If URI handling is globally enabled, all filenames passed to
    338 .Fn sqlite3_open ,
    339 .Fn sqlite3_open_v2 ,
    340 .Fn sqlite3_open16
    341 or specified as part of ATTACH commands are interpreted as URIs,
    342 regardless of whether or not the SQLITE_OPEN_URI flag
    343 is set when the database connection is opened.
    344 If it is globally disabled, filenames are only interpreted as URIs
    345 if the SQLITE_OPEN_URI flag is set when the database connection is
    346 opened.
    347 By default, URI handling is globally disabled.
    348 The default value may be changed by compiling with the SQLITE_USE_URI
    349 symbol defined.
    350 .It SQLITE_CONFIG_COVERING_INDEX_SCAN
    351 The SQLITE_CONFIG_COVERING_INDEX_SCAN option takes a single integer
    352 argument which is interpreted as a boolean in order to enable or disable
    353 the use of covering indices for full table scans in the query optimizer.
    354 The default setting is determined by the SQLITE_ALLOW_COVERING_INDEX_SCAN
    355 compile-time option, or is "on" if that compile-time option is omitted.
    356 The ability to disable the use of covering indices for full table scans
    357 is because some incorrectly coded legacy applications might malfunction
    358 when the optimization is enabled.
    359 Providing the ability to disable the optimization allows the older,
    360 buggy application code to work without change even with newer versions
    361 of SQLite.
    362 .It SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE
    363 These options are obsolete and should not be used by new code.
    364 They are retained for backwards compatibility but are now no-ops.
    365 .It SQLITE_CONFIG_SQLLOG
    366 This option is only available if sqlite is compiled with the SQLITE_ENABLE_SQLLOG
    367 pre-processor macro defined.
    368 The first argument should be a pointer to a function of type void(*)(void*,sqlite3*,const
    369 char*, int).
    370 The second should be of type (void*).
    371 The callback is invoked by the library in three separate circumstances,
    372 identified by the value passed as the fourth parameter.
    373 If the fourth parameter is 0, then the database connection passed as
    374 the second argument has just been opened.
    375 The third argument points to a buffer containing the name of the main
    376 database file.
    377 If the fourth parameter is 1, then the SQL statement that the third
    378 parameter points to has just been executed.
    379 Or, if the fourth parameter is 2, then the connection being passed
    380 as the second parameter is being closed.
    381 The third parameter is passed NULL In this case.
    382 An example of using this configuration option can be seen in the "test_sqllog.c"
    383 source file in the canonical SQLite source tree.
    384 .It SQLITE_CONFIG_MMAP_SIZE
    385 SQLITE_CONFIG_MMAP_SIZE takes two 64-bit integer (sqlite3_int64) values
    386 that are the default mmap size limit (the default setting for PRAGMA mmap_size)
    387 and the maximum allowed mmap size limit.
    388 The default setting can be overridden by each database connection using
    389 either the PRAGMA mmap_size command, or by using the
    390 SQLITE_FCNTL_MMAP_SIZE file control.
    391 The maximum allowed mmap size will be silently truncated if necessary
    392 so that it does not exceed the compile-time maximum mmap size set by
    393 the SQLITE_MAX_MMAP_SIZE compile-time option.
    394 If either argument to this option is negative, then that argument is
    395 changed to its compile-time default.
    396 .It SQLITE_CONFIG_WIN32_HEAPSIZE
    397 The SQLITE_CONFIG_WIN32_HEAPSIZE option is only available if SQLite
    398 is compiled for Windows with the SQLITE_WIN32_MALLOC
    399 pre-processor macro defined.
    400 SQLITE_CONFIG_WIN32_HEAPSIZE takes a 32-bit unsigned integer value
    401 that specifies the maximum size of the created heap.
    402 .It SQLITE_CONFIG_PCACHE_HDRSZ
    403 The SQLITE_CONFIG_PCACHE_HDRSZ option takes a single parameter which
    404 is a pointer to an integer and writes into that integer the number
    405 of extra bytes per page required for each page in SQLITE_CONFIG_PAGECACHE.
    406 The amount of extra space required can change depending on the compiler,
    407 target platform, and SQLite version.
    408 .It SQLITE_CONFIG_PMASZ
    409 The SQLITE_CONFIG_PMASZ option takes a single parameter which is an
    410 unsigned integer and sets the "Minimum PMA Size" for the multithreaded
    411 sorter to that integer.
    412 The default minimum PMA Size is set by the SQLITE_SORTER_PMASZ
    413 compile-time option.
    414 New threads are launched to help with sort operations when multithreaded
    415 sorting is enabled (using the PRAGMA threads command)
    416 and the amount of content to be sorted exceeds the page size times
    417 the minimum of the PRAGMA cache_size setting and this
    418 value.
    419 .It SQLITE_CONFIG_STMTJRNL_SPILL
    420 The SQLITE_CONFIG_STMTJRNL_SPILL option takes a single parameter which
    421 becomes the statement journal spill-to-disk threshold.
    422 Statement journals are held in memory until their
    423 size (in bytes) exceeds this threshold, at which point they are written
    424 to disk.
    425 Or if the threshold is -1, statement journals are always held exclusively
    426 in memory.
    427 Since many statement journals never become large, setting the spill
    428 threshold to a value such as 64KiB can greatly reduce the amount of
    429 I/O required to support statement rollback.
    430 The default value for this setting is controlled by the SQLITE_STMTJRNL_SPILL
    431 compile-time option.
    432 .It SQLITE_CONFIG_SORTERREF_SIZE
    433 The SQLITE_CONFIG_SORTERREF_SIZE option accepts a single parameter
    434 of type (int) - the new value of the sorter-reference size threshold.
    435 Usually, when SQLite uses an external sort to order records according
    436 to an ORDER BY clause, all fields required by the caller are present
    437 in the sorted records.
    438 However, if SQLite determines based on the declared type of a table
    439 column that its values are likely to be very large - larger than the
    440 configured sorter-reference size threshold - then a reference is stored
    441 in each sorted record and the required column values loaded from the
    442 database as records are returned in sorted order.
    443 The default value for this option is to never use this optimization.
    444 Specifying a negative value for this option restores the default behavior.
    445 This option is only available if SQLite is compiled with the SQLITE_ENABLE_SORTER_REFERENCES
    446 compile-time option.
    447 .It SQLITE_CONFIG_MEMDB_MAXSIZE
    448 The SQLITE_CONFIG_MEMDB_MAXSIZE option accepts a single parameter sqlite3_int64
    449 parameter which is the default maximum size for an in-memory database
    450 created using
    451 .Fn sqlite3_deserialize .
    452 This default maximum size can be adjusted up or down for individual
    453 databases using the SQLITE_FCNTL_SIZE_LIMIT
    454 file-control.
    455 If this configuration setting is never used, then the default maximum
    456 is determined by the SQLITE_MEMDB_DEFAULT_MAXSIZE
    457 compile-time option.
    458 If that compile-time option is not set, then the default maximum is
    459 1073741824.
    460 .It SQLITE_CONFIG_ROWID_IN_VIEW
    461 The SQLITE_CONFIG_ROWID_IN_VIEW option enables or disables the ability
    462 for VIEWs to have a ROWID.
    463 The capability can only be enabled if SQLite is compiled with -DSQLITE_ALLOW_ROWID_IN_VIEW,
    464 in which case the capability defaults to on.
    465 This configuration option queries the current setting or changes the
    466 setting to off or on.
    467 The argument is a pointer to an integer.
    468 If that integer initially holds a value of 1, then the ability for
    469 VIEWs to have ROWIDs is activated.
    470 If the integer initially holds zero, then the ability is deactivated.
    471 Any other initial value for the integer leaves the setting unchanged.
    472 After changes, if any, the integer is written with a 1 or 0, if the
    473 ability for VIEWs to have ROWIDs is on or off.
    474 If SQLite is compiled without -DSQLITE_ALLOW_ROWID_IN_VIEW (which is
    475 the usual and recommended case) then the integer is always filled with
    476 zero, regardless if its initial value.
    477 .El
    478 .Pp
    479 .Sh IMPLEMENTATION NOTES
    480 These declarations were extracted from the
    481 interface documentation at line 1826.
    482 .Bd -literal
    483 #define SQLITE_CONFIG_SINGLETHREAD         1  /* nil */
    484 #define SQLITE_CONFIG_MULTITHREAD          2  /* nil */
    485 #define SQLITE_CONFIG_SERIALIZED           3  /* nil */
    486 #define SQLITE_CONFIG_MALLOC               4  /* sqlite3_mem_methods* */
    487 #define SQLITE_CONFIG_GETMALLOC            5  /* sqlite3_mem_methods* */
    488 #define SQLITE_CONFIG_SCRATCH              6  /* No longer used */
    489 #define SQLITE_CONFIG_PAGECACHE            7  /* void*, int sz, int N */
    490 #define SQLITE_CONFIG_HEAP                 8  /* void*, int nByte, int min */
    491 #define SQLITE_CONFIG_MEMSTATUS            9  /* boolean */
    492 #define SQLITE_CONFIG_MUTEX               10  /* sqlite3_mutex_methods* */
    493 #define SQLITE_CONFIG_GETMUTEX            11  /* sqlite3_mutex_methods* */
    494 /* previously SQLITE_CONFIG_CHUNKALLOC    12 which is now unused. */
    495 #define SQLITE_CONFIG_LOOKASIDE           13  /* int int */
    496 #define SQLITE_CONFIG_PCACHE              14  /* no-op */
    497 #define SQLITE_CONFIG_GETPCACHE           15  /* no-op */
    498 #define SQLITE_CONFIG_LOG                 16  /* xFunc, void* */
    499 #define SQLITE_CONFIG_URI                 17  /* int */
    500 #define SQLITE_CONFIG_PCACHE2             18  /* sqlite3_pcache_methods2* */
    501 #define SQLITE_CONFIG_GETPCACHE2          19  /* sqlite3_pcache_methods2* */
    502 #define SQLITE_CONFIG_COVERING_INDEX_SCAN 20  /* int */
    503 #define SQLITE_CONFIG_SQLLOG              21  /* xSqllog, void* */
    504 #define SQLITE_CONFIG_MMAP_SIZE           22  /* sqlite3_int64, sqlite3_int64 */
    505 #define SQLITE_CONFIG_WIN32_HEAPSIZE      23  /* int nByte */
    506 #define SQLITE_CONFIG_PCACHE_HDRSZ        24  /* int *psz */
    507 #define SQLITE_CONFIG_PMASZ               25  /* unsigned int szPma */
    508 #define SQLITE_CONFIG_STMTJRNL_SPILL      26  /* int nByte */
    509 #define SQLITE_CONFIG_SMALL_MALLOC        27  /* boolean */
    510 #define SQLITE_CONFIG_SORTERREF_SIZE      28  /* int nByte */
    511 #define SQLITE_CONFIG_MEMDB_MAXSIZE       29  /* sqlite3_int64 */
    512 #define SQLITE_CONFIG_ROWID_IN_VIEW       30  /* int* */
    513 .Ed
    514 .Sh SEE ALSO
    515 .Xr sqlite3 3 ,
    516 .Xr sqlite3_config 3 ,
    517 .Xr sqlite3_db_config 3 ,
    518 .Xr sqlite3_deserialize 3 ,
    519 .Xr sqlite3_file_control 3 ,
    520 .Xr sqlite3_initialize 3 ,
    521 .Xr sqlite3_log 3 ,
    522 .Xr sqlite3_malloc 3 ,
    523 .Xr sqlite3_mem_methods 3 ,
    524 .Xr sqlite3_memory_used 3 ,
    525 .Xr sqlite3_mprintf 3 ,
    526 .Xr sqlite3_mutex_methods 3 ,
    527 .Xr sqlite3_open 3 ,
    528 .Xr sqlite3_pcache_methods2 3 ,
    529 .Xr sqlite3_soft_heap_limit64 3 ,
    530 .Xr sqlite3_status 3 ,
    531 .Xr sqlite3_stmt 3 ,
    532 .Xr SQLITE_DBCONFIG_MAINDBNAME 3 ,
    533 .Xr SQLITE_FCNTL_LOCKSTATE 3 ,
    534 .Xr sqlite_int64 3 ,
    535 .Xr SQLITE_OK 3 ,
    536 .Xr SQLITE_OPEN_READONLY 3
    537