Documentation Source Text

Changes On Branch branch-3.27
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch branch-3.27 Excluding Merge-Ins

This is equivalent to a diff from 9ea89e32bf to 87bef3d123

2019-04-08
18:08
Fix a minor error in the datatype documentation. (Leaf check-in: 87bef3d123 user: drh tags: branch-3.27)
18:06
Fix a minor error in the datatype documentation. (check-in: a5590f5f81 user: drh tags: trunk)
2019-04-01
14:44
Improvements to VACUUM documentation - describe more clearly when another transaction might block a vacuum. (check-in: 0f897a0268 user: drh tags: branch-3.27)
2019-02-27
23:13
Add a note to the printf() documentation to make clear that the built-in SQLite printf() does not implement positional parameters. (check-in: e0c57dd3d0 user: drh tags: branch-3.27)
16:51
Add documentation for the Tcl command "db function" -returntype option. (check-in: 2f154421cf user: dan tags: trunk)
13:46
Updates to the althttpd.md documentation. (check-in: 9ea89e32bf user: drh tags: trunk)
13:20
Sanitize the search string when doing a search against the changelog. (check-in: 0a969667a7 user: drh tags: trunk)

Changes to images/foreignlogos/expensify.png.

cannot compute difference between binary files

Changes to pages/cli.in.

1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
<p>
The following additional compile-time options are recommended in order to
provide a full-featured command-line shell:

<ul>
<li> [-DSQLITE_THREADSAFE=0]
<li> [-DSQLITE_ENABLE_EXPLAIN_COMMENTS]
<li> [-DSQLITE_USE_ZLIB]
<li> [-DSQLITE_INTROSPECTION_PRAGMAS]
<li> [-DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION]
<li> [-DSQLITE_ENABLE_STMTVTAB]
<li> [-DSQLITE_ENABLE_DBPAGE_VTAB]
<li> [-DSQLITE_ENABLE_DBSTAT_VTAB]
<li> [-DSQLITE_ENABLE_OFFSET_SQL_FUNC]
<li> [-DSQLITE_ENABLE_JSON1]







|







1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
<p>
The following additional compile-time options are recommended in order to
provide a full-featured command-line shell:

<ul>
<li> [-DSQLITE_THREADSAFE=0]
<li> [-DSQLITE_ENABLE_EXPLAIN_COMMENTS]
<li> [-DSQLITE_HAVE_ZLIB]
<li> [-DSQLITE_INTROSPECTION_PRAGMAS]
<li> [-DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION]
<li> [-DSQLITE_ENABLE_STMTVTAB]
<li> [-DSQLITE_ENABLE_DBPAGE_VTAB]
<li> [-DSQLITE_ENABLE_DBSTAT_VTAB]
<li> [-DSQLITE_ENABLE_OFFSET_SQL_FUNC]
<li> [-DSQLITE_ENABLE_JSON1]

Changes to pages/compile.in.

1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255

COMPILE_OPTION {SQLITE_USE_FCNTL_TRACE} {
  This option causes SQLite to issue extra [SQLITE_FCNTL_TRACE] file controls
  to provide supplementary information to the VFS.  The "vfslog.c" extension
  makes use of this to provide enhanced logs of VFS activity.
}

COMPILE_OPTION {SQLITE_USE_ZLIB} {
  This option causes some extensions to link against the 
  [https://zlib.net|zlib compression library].
  <p>
  This option has no affect on the SQLite core.  It is only used by extensions.
  This is option is necessary for the commpression and decompression
  functions that are part of [SQL Archive] support in the
  [command-line shell].







|







1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255

COMPILE_OPTION {SQLITE_USE_FCNTL_TRACE} {
  This option causes SQLite to issue extra [SQLITE_FCNTL_TRACE] file controls
  to provide supplementary information to the VFS.  The "vfslog.c" extension
  makes use of this to provide enhanced logs of VFS activity.
}

COMPILE_OPTION {SQLITE_HAVE_ZLIB} {
  This option causes some extensions to link against the 
  [https://zlib.net|zlib compression library].
  <p>
  This option has no affect on the SQLite core.  It is only used by extensions.
  This is option is necessary for the commpression and decompression
  functions that are part of [SQL Archive] support in the
  [command-line shell].

Changes to pages/datatype3.in.

323
324
325
326
327
328
329
330
331
332
333
334
335
336
337

<blockquote><pre>
CREATE TABLE t1(a INT, b TEXT, c REAL);
CREATE VIEW v1(x,y,z) AS SELECT b, a+c, 42 FROM t1 WHERE b!=11;
</pre></blockquote>

<p>The affinity of the v1.x column will be the same as the affinity
of t1.b (INTEGER), since v1.x maps directly into t1.b.  But
columns v1.y and v1.z both have no affinity, since those columns
map into expression a+c and 42, and expressions always have no
affinity.

<p>When the [SELECT] statement that implements a [VIEW] or 
FROM-clause subquery is a [compound SELECT] then the affinity of 
each supposed column of the VIEW or subquery will







|







323
324
325
326
327
328
329
330
331
332
333
334
335
336
337

<blockquote><pre>
CREATE TABLE t1(a INT, b TEXT, c REAL);
CREATE VIEW v1(x,y,z) AS SELECT b, a+c, 42 FROM t1 WHERE b!=11;
</pre></blockquote>

<p>The affinity of the v1.x column will be the same as the affinity
of t1.b (TEXT), since v1.x maps directly into t1.b.  But
columns v1.y and v1.z both have no affinity, since those columns
map into expression a+c and 42, and expressions always have no
affinity.

<p>When the [SELECT] statement that implements a [VIEW] or 
FROM-clause subquery is a [compound SELECT] then the affinity of 
each supposed column of the VIEW or subquery will

Changes to pages/json1.in.

172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
store values that are NULL, integers, floating-point numbers, text,
and BLOBs.  It is not possible to add a sixth "JSON" type.

<p>
The json1 extension does not (currently) support a binary encoding
of JSON.  Experiments have been unable to find a binary encoding
that is significantly smaller or faster than a plain text encoding.
(The present implementation parses JSON text at over 300 MB/s.)
All json1 functions currently throw an error if any of their
arguments are BLOBs because BLOBs are reserved
for a future enhancement in which BLOBs will store the binary encoding
for JSON.

<p>
The "1" at the end of the name for the json1 extension is deliberate.







|







172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
store values that are NULL, integers, floating-point numbers, text,
and BLOBs.  It is not possible to add a sixth "JSON" type.

<p>
The json1 extension does not (currently) support a binary encoding
of JSON.  Experiments have been unable to find a binary encoding
that is significantly smaller or faster than a plain text encoding.
(The present implementation parses JSON text at over 1 GB/s.)
All json1 functions currently throw an error if any of their
arguments are BLOBs because BLOBs are reserved
for a future enhancement in which BLOBs will store the binary encoding
for JSON.

<p>
The "1" at the end of the name for the json1 extension is deliberate.

Changes to pages/lang.in.

5053
5054
5055
5056
5057
5058
5059
5060


5061



5062
5063
5064
5065
5066
5067
5068
named on the INTO clause in place of the temporary database and omits the
step of copying the vacuumed database back over top of the original database.

<p>^The VACUUM command may change the [ROWID | ROWIDs] of entries in any
tables that do not have an explicit [INTEGER PRIMARY KEY].
</p>

<p>^A VACUUM will fail if there is an open transaction, or if there are one or


more active SQL statements when it is run.




<p>^(An alternative to using the VACUUM command to
reclaim space after data has been deleted is auto-vacuum mode, enabled using
the [auto_vacuum] pragma.)^ ^When [auto_vacuum] is enabled for a database
free pages may be reclaimed after deleting data, causing the file to shrink,
without rebuilding the entire database using VACUUM.  ^However, using
[auto_vacuum] can lead to extra database file fragmentation.  ^And [auto_vacuum]







|
>
>
|
>
>
>







5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
named on the INTO clause in place of the temporary database and omits the
step of copying the vacuumed database back over top of the original database.

<p>^The VACUUM command may change the [ROWID | ROWIDs] of entries in any
tables that do not have an explicit [INTEGER PRIMARY KEY].
</p>

<p>^A VACUUM will fail if there is an open transaction on the database
connection that is attempting to run the VACUUM.  ^Unfinalized SQL
statements typically hold a read transaction open, so the VACUUM
might fail if there are unfinalized SQL statements on the same connection.
^VACUUM (but not VACUUM INTO) is a write operation and so if another
database connection is holding a lock that prevents writes, then
the VACUUM will fail.

<p>^(An alternative to using the VACUUM command to
reclaim space after data has been deleted is auto-vacuum mode, enabled using
the [auto_vacuum] pragma.)^ ^When [auto_vacuum] is enabled for a database
free pages may be reclaimed after deleting data, causing the file to shrink,
without rebuilding the entire database using VACUUM.  ^However, using
[auto_vacuum] can lead to extra database file fragmentation.  ^And [auto_vacuum]

Changes to pages/printf.in.

94
95
96
97
98
99
100






101
102
103
104
105
106
107
Every IEEE-754 double can be represented exactly as a decimal floating-point
value, but some doubles require more than 16 or 26 significant digits.

<li><p>
The order of the buffer pointer and buffer size parameters in the built-in
snprintf() implementation is reversed from the order used in standard-library
implementations.






</ol>

<p>
In spite of the disadvantages, the developers believe that having a built-in
printf() implementation inside of SQLite is a net positive.

<h1>Formatting Details</h1>







>
>
>
>
>
>







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Every IEEE-754 double can be represented exactly as a decimal floating-point
value, but some doubles require more than 16 or 26 significant digits.

<li><p>
The order of the buffer pointer and buffer size parameters in the built-in
snprintf() implementation is reversed from the order used in standard-library
implementations.

<li><p>
The built-in printf() implementation does not handle posix positional referencing
modifiers that allow the order of arguments to printf() to be different from the
order of the %-substitutions.  In the built-in printf(), the order of the arguments
must exactly match the order of the %-substitutions.
</ol>

<p>
In spite of the disadvantages, the developers believe that having a built-in
printf() implementation inside of SQLite is a net positive.

<h1>Formatting Details</h1>

Changes to pages/rescode.in.

222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
  abundance of primary disk space because the error occurs when writing
  into [temporary disk files] on a system where temporary files are stored
  on a separate partition with much less space that the primary disk.
}
RESCODE SQLITE_CANTOPEN    14   {
  The SQLITE_CANTOPEN result code indicates that SQLite was unable to
  open a file.  The file in question might be a primary database file
  or on of several [temporary disk files].
}
RESCODE SQLITE_PROTOCOL    15   {
  The SQLITE_PROTOCOL result code indicates a problem with the file locking
  protocol used by SQLite.  The SQLITE_PROTOCOL error is currently only
  returned when using [WAL mode] and attempting to start a new transaction.
  There is a race condition that can occur when two separate 
  [database connections] both try to start a transaction at the same time







|







222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
  abundance of primary disk space because the error occurs when writing
  into [temporary disk files] on a system where temporary files are stored
  on a separate partition with much less space that the primary disk.
}
RESCODE SQLITE_CANTOPEN    14   {
  The SQLITE_CANTOPEN result code indicates that SQLite was unable to
  open a file.  The file in question might be a primary database file
  or one of several [temporary disk files].
}
RESCODE SQLITE_PROTOCOL    15   {
  The SQLITE_PROTOCOL result code indicates a problem with the file locking
  protocol used by SQLite.  The SQLITE_PROTOCOL error is currently only
  returned when using [WAL mode] and attempting to start a new transaction.
  There is a race condition that can occur when two separate 
  [database connections] both try to start a transaction at the same time