Documentation Source Text

Changes On Branch branch-3.25
Login

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

Changes In Branch branch-3.25 Excluding Merge-Ins

This is equivalent to a diff from 2bdb2d7e21 to 4182b1655e

2018-11-26
12:01
Merge typo fix from the 3.25 branch. (check-in: 121aeee579 user: drh tags: trunk)
12:01
Fix typo in the wal.html document. (Leaf check-in: 4182b1655e user: drh tags: branch-3.25)
2018-11-07
17:35
Improvements to the documentation of the busy method in the TCL interface. Words contributed by flightaware. (check-in: bf23032b75 user: drh tags: branch-3.25)
2018-09-24
14:38
Improved linkage to window functions. (check-in: 1c7ab913f0 user: drh tags: branch-3.25)
12:40
Document the SQLITE_QUERY_PLANNER_LIMIT and SQLITE_QUERY_PLANNER_LIMIT_INCR compile-time options. (check-in: 55fce17e3c user: drh tags: trunk)
2018-09-21
10:16
Fix a harmless typo in the json documentation. (check-in: 2bdb2d7e21 user: drh tags: trunk)
2018-09-19
11:04
Fix a typo in the JSON extension documentation. (check-in: 7eef7f4c93 user: drh tags: trunk)

Changes to common_links.tcl.

8
9
10
11
12
13
14

15
16
17
18
19
20
21
<li> <a href="chronology.html">Prior Releases</a>
<li> <a href="lang.html">SQL Syntax</a>
<ul>
<li> <a href="pragma.html#toc">Pragmas</a>
<li> <a href="lang_corefunc.html">SQL functions</a>
<li> <a href="lang_datefunc.html">Date &amp; time functions</a>
<li> <a href="lang_aggfunc.html">Aggregate functions</a>

<li> <a href="json1.html">JSON functions</a>
</ul>
</li>
<li> <a href="c3ref/intro.html">C/C++ Interface Spec</a>
<ul>
<li> <a href="cintro.html">Introduction</a>
<li> <a href="c3ref/funclist.html">List of C-language APIs</a>







>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<li> <a href="chronology.html">Prior Releases</a>
<li> <a href="lang.html">SQL Syntax</a>
<ul>
<li> <a href="pragma.html#toc">Pragmas</a>
<li> <a href="lang_corefunc.html">SQL functions</a>
<li> <a href="lang_datefunc.html">Date &amp; time functions</a>
<li> <a href="lang_aggfunc.html">Aggregate functions</a>
<li> <a href="windowfunctions.html#biwinfunc">Window functions</a>
<li> <a href="json1.html">JSON functions</a>
</ul>
</li>
<li> <a href="c3ref/intro.html">C/C++ Interface Spec</a>
<ul>
<li> <a href="cintro.html">Introduction</a>
<li> <a href="c3ref/funclist.html">List of C-language APIs</a>

Deleted images/foreignlogos/bloomberg.gif.

cannot compute difference between binary files

Added images/foreignlogos/bloomberg.png.

cannot compute difference between binary files

Changes to pages/changes.in.

17
18
19
20
21
22
23


































24
25
26
27
28
29
30
proc chng {date desc {options {}}} {
  global nChng aChng xrefChng
  set aChng($nChng) [list $date $desc $options]
  set xrefChng($date) $nChng
  incr nChng
}



































chng {2018-09-18 (3.25.1)} {
<li> Extra sanity checking added to ALTER TABLE in the 3.25.0 release
     sometimes raises a false-positive
     when the table being modified has a trigger that
     updates a virtual table.  The false-positive caused the ALTER
     TABLE to rollback, thus leaving the schema unchanged.
     Ticket [https://sqlite.org/src/info/b41031ea2b537237|b41031ea2b537237].







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
proc chng {date desc {options {}}} {
  global nChng aChng xrefChng
  set aChng($nChng) [list $date $desc $options]
  set xrefChng($date) $nChng
  incr nChng
}

chng {2018-11-05 (3.25.3)} {
<li> Disallow the use of [window functions] in the recursive part of
     a CTE. Ticket [https://sqlite.org/src/info/e8275b415a2f03bee|e8275b415a2f03bee]
<li> Fix the behavior of typeof() and length() on virtual tables.  Ticket
     [https://sqlite.org/src/info/69d642332d25aa3b7315a6d385|69d642332d25aa3b7315a6d385]
<li> Strengthen defenses against deliberately corrupted database files.
<li> Fix a problem in the query planner that results when a row-value expression
     is used with a PRIMARY KEY with redundant columns.  Ticket
     [https://sqlite.org/src/info/1a84668dcfdebaf12415d|1a84668dcfdebaf12415d]
<li> Fix the query planner so that it works correctly for IS NOT NULL operators
     in the ON clause of a LEFT JOIN with the SQLITE_ENABLE_STAT4 compile-time option.
     [https://sqlite.org/src/info/65eb38f6e46de8c75e188a17ec|65eb38f6e46de8c75e188a17ec]
<p><b>Hashes:</b>
<li>SQLITE_SOURCE_ID: "2018-11-05 20:37:38 89e099fbe5e13c33e683bef07361231ca525b88f7907be7092058007b75036f2"
<li>SHA3-256 for sqlite3.c: 45586e4df74de3a43f3a1f8c7a78c3c3f02edce01af7d10cafe68bb94476a5c5
} {patchagainst 1 patchagainst 2 patchagainst 3}

chng {2018-09-25 (3.25.2)} {
<li> Add the [PRAGMA legacy_alter_table=ON] command that causes the
     "ALTER TABLE RENAME" command to behave as it did in SQLite versions 3.24.0
     and earlier: references to the renamed table inside the bodies of triggers
     and views are not updated.  This new pragma provides a compatibility
     work around for older programs that expected the older, wonky behavior
     of ALTER TABLE RENAME.
<li> Fix a problem with the new [window functions] implementation that caused
     a malfunction when complicated expressions involving window functions were used
     inside of a view.
<li> Fixes for various other compiler warnings and minor problems associated
     with obscure configurations.
<p><b>Hashes:</b>
<li>SQLITE_SOURCE_ID: "2018-09-25 19:08:10 fb90e7189ae6d62e77ba3a308ca5d683f90bbe633cf681865365b8e92792d1c7"
<li>SHA3-256 for sqlite3.c: 34c23ff91631ae10354f8c9d62fd7d65732b3d7f3acfd0bbae31ff4a62fe28af
} {patchagainst 1 patchagainst 2}

chng {2018-09-18 (3.25.1)} {
<li> Extra sanity checking added to ALTER TABLE in the 3.25.0 release
     sometimes raises a false-positive
     when the table being modified has a trigger that
     updates a virtual table.  The false-positive caused the ALTER
     TABLE to rollback, thus leaving the schema unchanged.
     Ticket [https://sqlite.org/src/info/b41031ea2b537237|b41031ea2b537237].

Changes to pages/chronology.in.

24
25
26
27
28
29
30


31
32
33
34
35
36
37
#    ORDER BY mtime DESC;
#
# A small amount of manual editing and de-duplication followed.
#
# Manually edit the list for each subsequent release.
#      
foreach line [split {


2ac9003de4|2018-09-18|Version 3.25.1
b63af6c3bd|2018-09-15|Version 3.25.0
c7ee083322|2018-06-04|Version 3.24.0
4bb2294022|2018-04-10|Version 3.23.1
736b53f57f|2018-04-02|Version 3.23.0
0c55d17973|2018-01-22|Version 3.22.0
1a584e4999|2017-10-24|Version 3.21.0







>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#    ORDER BY mtime DESC;
#
# A small amount of manual editing and de-duplication followed.
#
# Manually edit the list for each subsequent release.
#      
foreach line [split {
89e099fbe5|2018-11-05|Version 3.25.3
fb90e7189a|2018-09-25|Version 3.25.2
2ac9003de4|2018-09-18|Version 3.25.1
b63af6c3bd|2018-09-15|Version 3.25.0
c7ee083322|2018-06-04|Version 3.24.0
4bb2294022|2018-04-10|Version 3.23.1
736b53f57f|2018-04-02|Version 3.23.0
0c55d17973|2018-01-22|Version 3.22.0
1a584e4999|2017-10-24|Version 3.21.0

Changes to pages/codeofconduct.in.

1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<title>Code Of Conduct</title>


<fancy_format>

<h1>Overview</h1>

<p>Having been encouraged by clients to adopt a written
code of conduct, the SQLite developers elected to govern their
interactions with each other, with their clients,
and with the larger SQLite user community in
accordance with the "instruments of good works" from chapter 4 of
[https://en.wikipedia.org/wiki/Rule_of_Saint_Benedict|The Rule of St. Benedict].
This code of conduct has proven its mettle in thousands of diverse
communities for over 1,500 years, and has served as a baseline for many
civil law codes since the time of Charlemagne.

<p>
This rule is strict, and none are able to comply perfectly.
Grace is readily granted for minor transgressions.
All are encouraged to follow this rule closely, as in so
doing they may expect to live happier, healthier, and more
productive lives.  The entire rule is good and wholesome, and
yet we make no enforcement of the more introspective aspects.

<p>
Everyone is free to use the SQLite source code, object code,
and/or documentation regardless of their opinion of and adherence
to this rule.
SQLite has been and continues to be completely free to everyone,
without precondition.

<p>
However, those who wish to participate in the SQLite community,
either by commenting on the public mailing lists or by contributing
patches or suggestions or in any other way,
are expected to conduct themselves in a manner
that honors the overarching spirit of the rule, even if they
disagree with specific details.
Polite and professional discussion is always welcomed, from anyone.

<h1>The Rule</h1>

<ol>
<li> First of all, love the Lord God with your whole heart,
     your whole soul, and your whole strength.
<li> Then, love your neighbor as yourself.
<li> Do not murder.
<li> Do not commit adultery.
<li> Do not steal.
<li> Do not covet.
<li> Do not bear false witness.
<li> Honor all.
<li> Do not do to another what you would not have done to yourself.
<li> Deny oneself in order to follow Christ.
<li> Chastise the body.
<li> Do not become attached to pleasures.
<li> Love fasting.
<li> Relieve the poor.
<li> Clothe the naked.
<li> Visit the sick.
<li> Bury the dead.
<li> Be a help in times of trouble.
<li> Console the sorrowing.
<li> Be a stranger to the world's ways.
<li> Prefer nothing more than the love of Christ.
<li> Do not give way to anger.
<li> Do not nurse a grudge.
<li> Do not entertain deceit in your heart.
<li> Do not give a false peace.
<li> Do not forsake charity.
<li> Do not swear, for fear of perjuring yourself.
<li> Utter only truth from heart and mouth.
<li> Do not return evil for evil.
<li> Do no wrong to anyone, and bear patiently wrongs done to yourself.
<li> Love your enemies.
<li> Do not curse those who curse you, but rather bless them.
<li> Bear persecution for justice's sake.
<li> Be not proud.
<li> Be not addicted to wine.
<li> Be not a great eater.

<li> Be not drowsy.
<li> Be not lazy.
<li> Be not a grumbler.
<li> Be not a detractor.
<li> Put your hope in God.
<li> Attribute to God, and not to self, whatever good you see in yourself.
<li> Recognize always that evil is your own doing,
     and to impute it to yourself.
<li> Fear the Day of Judgment.
<li> Be in dread of hell.
<li> Desire eternal life with all the passion of the spirit.
<li> Keep death daily before your eyes.
<li> Keep constant guard over the actions of your life.
<li> Know for certain that God sees you everywhere.
<li> When wrongful thoughts come into your heart, dash them against
     Christ immediately.
<li> Disclose wrongful thoughts to your spiritual mentor.
<li> Guard your tongue against evil and depraved speech.
<li> Do not love much talking.
<li> Speak no useless words or words that move to laughter.
<li> Do not love much or boisterous laughter.
<li> Listen willingly to holy reading.
<li> Devote yourself frequently to prayer.
<li> Daily in your prayers, with tears and sighs, confess your
     past sins to God, and amend them for the future.
<li> Fulfill not the desires of the flesh; hate your own will.
<li> Obey in all things the commands of those whom God has placed
     in authority over you even though they (which God forbid) should 
     act otherwise, mindful of the Lord's precept, "Do what they say, 
     but not what they do."
<li> Do not wish to be called holy before one is holy; but first to be
     holy, that you may be truly so called.
<li> Fulfill God's commandments daily in your deeds.
<li> Love chastity.
<li> Hate no one.
<li> Be not jealous, nor harbor envy.
<li> Do not love quarreling.
<li> Shun arrogance.
<li> Respect your seniors.
<li> Love your juniors.
<li> Pray for your enemies in the love of Christ.
<li> Make peace with your adversary before the sun sets.
<li> Never despair of God's mercy.
</ol>

>





<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
|
<
<
|
<
<
<
|
<
<
<
<
<
<
<
<
|
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
|
|
|
|
|
|
|
|
|
|
|
|
<
|
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
<
1
2
3
4
5
6
7










8






9


10



11








12

13




















14


15
16
17
18
19
20
21
22
23
24
25
26

27

28
29




























30












31

<title>Code Of Conduct</title>
<tcl>hd_keywords {Code of Conduct}</tcl>

<fancy_format>

<h1>Overview</h1>











<p>






The original document we put here was more of a 


[Code of Ethics of the Project Founder]. 



While we stand by those principles, they are not in line with the modern








technical meaning of a Code of Conduct and have hence been renamed.






















<h1>Code of Conduct</h1>



<p>
The SQLite community has been a kind, welcoming and well-mannered community
since its inception nearly two decades ago. In that time many of the
qualities we've worked hard to bring to our project - safety, consistency,
usability and integrity among them - have become part of our community's
culture as well. Much like the care and effort we've put into securing the
longevity of SQLite, we'd like to do the same for that community by 
clarifying our goals and expectations for all involved. To that end
the SQLite project has officially adopted the 
[https://www.mozilla.org/en-US/about/governance/policies/participation/|Mozilla Community Participation Guidelines]
as its Code of Conduct with the exception that the reporting

email address is changed to

<a href="mailto:codeofconduct@sqlite.org">codeofconduct@sqlite.org</a>.
While we are not doing so in reaction to any current or ongoing issues,




























we believe that this will be a helpful part of maintaining the long-term












sustainability of the project.

Added pages/codeofethics.in.













































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<title>Code Of Ethics</title>
<tcl>hd_keywords {Code of Ethics} {Code of Ethics of the Project Founder}</tcl>

<fancy_format>

<h1>Overview</h1>

<p>This document was originally called a "Code of Conduct" and
was created (in a slightly different format) for the purpose of
filling in a box on "supplier registration" forms
submitted to the SQLite developers by various minor clients.  However,
we subsequently learned that "Code of Conduct" has a specific technical
meaning within many software development communities, a meaning which
was at odds with the intent of this document.  Hence, this document
is now renamed and replaced by a 
[Code of Conduct|Code of Conduct] that does comply with the
specific techical requirements was inserted in the place of
the old name.

<p>
This document is still sometimes used as a "Code of Conduct" on supplier
registration forms.  But it is not a Code of Conduct in the same sense
that many communities mean a Code of Conduct.  Rather,
this document describes the foundational ethical principals upon
which SQLite is based.  Another way to look at this document is
as a succinct description of the SQLite Founder's idea of what it
means to be "virtuous".

<p>
Readers can also interpret this document as a primer on the
world-view of the SQLite Founder, to help them better understand
"where he is coming from".

<h2>Instruments of Good Works</h2>

<p>The founder of SQLite, and all of the current developers at the time
when this document was composed, have pledged to govern their
interactions with each other, with their clients,
and with the larger SQLite user community in
accordance with the "instruments of good works" from chapter 4 of
[https://en.wikipedia.org/wiki/Rule_of_Saint_Benedict|The Rule of St. Benedict]
(hereafter: "The Rule").
This code of ethics has proven its mettle in thousands of diverse
communities for over 1,500 years, and has served as a baseline for many
civil law codes since the time of Charlemagne.

<h2>Scope of Application</h2>

<p>
No one is required to follow The Rule, to know The Rule, or even
to think that The Rule is a good idea.  The Founder of SQLite believes
that anyone who follows The Rule will live a happier and more productive 
life, but individuals are free to dispute or ignore that advice if
they wish.

<p>
The founder of SQLite and all
current developers have pledged to follow spirit of The Rule
to the best of their ability. They
view The Rule as their promise to all SQLite users of how the developers
are expected to behave in community.
This is a one-way promise, or covenant.
In other words, the developers are saying: "We will treat you this
way regardless of how you treat us."


<h1>The Rule</h1>

<ol>
<li> First of all, love the Lord God with your whole heart,
     your whole soul, and your whole strength.
<li> Then, love your neighbor as yourself.
<li> Do not murder.
<li> Do not commit adultery.
<li> Do not steal.
<li> Do not covet.
<li> Do not bear false witness.
<li> Honor all.
<li> Do not do to another what you would not have done to yourself.
<li> Deny oneself in order to follow Christ.
<li> Chastise the body.
<li> Do not become attached to pleasures.
<li> Love fasting.
<li> Relieve the poor.
<li> Clothe the naked.
<li> Visit the sick.
<li> Bury the dead.
<li> Be a help in times of trouble.
<li> Console the sorrowing.
<li> Be a stranger to the world's ways.
<li> Prefer nothing more than the love of Christ.
<li> Do not give way to anger.
<li> Do not nurse a grudge.
<li> Do not entertain deceit in your heart.
<li> Do not give a false peace.
<li> Do not forsake charity.
<li> Do not swear, for fear of perjuring yourself.
<li> Utter only truth from heart and mouth.
<li> Do not return evil for evil.
<li> Do no wrong to anyone, and bear patiently wrongs done to yourself.
<li> Love your enemies.
<li> Do not curse those who curse you, but rather bless them.
<li> Bear persecution for justice's sake.
<li> Be not proud.
<li> Be not addicted to wine.
<li> Be not a great eater.
<li> Be not drowsy.
<li> Be not lazy.
<li> Be not a grumbler.
<li> Be not a detractor.
<li> Put your hope in God.
<li> Attribute to God, and not to self, whatever good you see in yourself.
<li> Recognize always that evil is your own doing,
     and to impute it to yourself.
<li> Fear the Day of Judgment.
<li> Be in dread of hell.
<li> Desire eternal life with all the passion of the spirit.
<li> Keep death daily before your eyes.
<li> Keep constant guard over the actions of your life.
<li> Know for certain that God sees you everywhere.
<li> When wrongful thoughts come into your heart, dash them against
     Christ immediately.
<li> Disclose wrongful thoughts to your spiritual mentor.
<li> Guard your tongue against evil and depraved speech.
<li> Do not love much talking.
<li> Speak no useless words or words that move to laughter.
<li> Do not love much or boisterous laughter.
<li> Listen willingly to holy reading.
<li> Devote yourself frequently to prayer.
<li> Daily in your prayers, with tears and sighs, confess your
     past sins to God, and amend them for the future.
<li> Fulfill not the desires of the flesh; hate your own will.
<li> Obey in all things the commands of those whom God has placed
     in authority over you even though they (which God forbid) should 
     act otherwise, mindful of the Lord's precept, "Do what they say, 
     but not what they do."
<li> Do not wish to be called holy before one is holy; but first to be
     holy, that you may be truly so called.
<li> Fulfill God's commandments daily in your deeds.
<li> Love chastity.
<li> Hate no one.
<li> Be not jealous, nor harbor envy.
<li> Do not love quarreling.
<li> Shun arrogance.
<li> Respect your seniors.
<li> Love your juniors.
<li> Pray for your enemies in the love of Christ.
<li> Make peace with your adversary before the sun sets.
<li> Never despair of God's mercy.
</ol>

Changes to pages/dbstat.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<title>The DBSTAT Virtual Table</title>
<tcl>hd_keywords dbstat {dbstat virtual table}</tcl>
<fancy_format>


<h1>Overview</h1>

<p>
The DBSTAT virtual tables is a read-only [eponymous virtual table] that returns
information about which pages of the database files are used by which
tables and indexes in the schema.
The DBSTAT virtual table is used to implement [sqlite3_analyzer.exe]
utility program, and to help compute the 
[https://www.sqlite.org/src/repo-tabsize|table size pie-chart] in
the [https://www.fossil-scm.org/|Fossil-implemented] version control system
for SQLite.








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<title>The DBSTAT Virtual Table</title>
<tcl>hd_keywords dbstat {dbstat virtual table}</tcl>
<fancy_format>


<h1>Overview</h1>

<p>
The DBSTAT virtual table is a read-only [eponymous virtual table] that returns
information about which pages of the database files are used by which
tables and indexes in the schema.
The DBSTAT virtual table is used to implement [sqlite3_analyzer.exe]
utility program, and to help compute the 
[https://www.sqlite.org/src/repo-tabsize|table size pie-chart] in
the [https://www.fossil-scm.org/|Fossil-implemented] version control system
for SQLite.

Changes to pages/index.in.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[full-featured SQL|full-featured], [public-domain],
SQL database engine.
SQLite is the [most used] database engine in the world.
<a class="button" href="about.html">More Info</a></p>

<hr class="xhr">
<span class="hdrfont">Latest Release:&nbsp;&nbsp;</span>
<a href="releaselog/3_25_1.html">Version 3.25.1</a> ([dateof:3.25.1]).
<a class="button" href="download.html">Download</a>
<a class="button" href="chronology.html">Prior Releases</a>

<div class="mobileonly">
<hr class="xhr">
<h3>Common Links</h3>
<tcl>common_links</tcl>







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[full-featured SQL|full-featured], [public-domain],
SQL database engine.
SQLite is the [most used] database engine in the world.
<a class="button" href="about.html">More Info</a></p>

<hr class="xhr">
<span class="hdrfont">Latest Release:&nbsp;&nbsp;</span>
<a href="releaselog/3_25_3.html">Version 3.25.3</a> ([dateof:3.25.3]).
<a class="button" href="download.html">Download</a>
<a class="button" href="chronology.html">Prior Releases</a>

<div class="mobileonly">
<hr class="xhr">
<h3>Common Links</h3>
<tcl>common_links</tcl>
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  {name   Mozilla
   url    https://www.mozilla.com/
   image  mozilla.gif
   blurb  "Working to preserve choice and innovation on the internet."
  }
  {name   Bloomberg
   url    https://www.bloomberg.com/
   image  bloomberg.gif
   blurb  "A world leader in financial-information technology."
  }
  {name   Bentley
   url    https://www.bentley.com/
   image  bentley.gif
   blurb  "Comprehensive software solutions for Sustaining Infrastructure."
  }







|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  {name   Mozilla
   url    https://www.mozilla.com/
   image  mozilla.gif
   blurb  "Working to preserve choice and innovation on the internet."
  }
  {name   Bloomberg
   url    https://www.bloomberg.com/
   image  bloomberg.png
   blurb  "A world leader in financial-information technology."
  }
  {name   Bentley
   url    https://www.bentley.com/
   image  bentley.gif
   blurb  "Comprehensive software solutions for Sustaining Infrastructure."
  }

Changes to pages/lang.in.

2386
2387
2388
2389
2390
2391
2392
2393

2394
2395

2396
2397
2398
2399
2400
2401
2402
<p>The boolean identifiers TRUE and FALSE are usually just aliases for
the integer values 1 and 0, respectively.  However, if TRUE or FALSE
occur on the right-hand side of an IS operator, then they form new
unary postfix operators "IS TRUE" and "IS FALSE" which test the boolean
value of the operand on the left.

<h3>Functions</h3>
<p>SQLite supports many [corefunc|simple] and [aggfunc|aggregate]

SQL functions.  For presentation purposes, simple functions are further
subdivided into [corefunc | core functions] and [datefunc|date-time functions].

Applications can add new functions, written in C/C++, using the
[sqlite3_create_function()] interface.
</p>

<p>^It is possible to have an aggregate function with the same name as a
simple function, as long as the number of arguments for the two forms of the
function are different.  ^For example, the [agg_max|max()] function with a







|
>

|
>







2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
<p>The boolean identifiers TRUE and FALSE are usually just aliases for
the integer values 1 and 0, respectively.  However, if TRUE or FALSE
occur on the right-hand side of an IS operator, then they form new
unary postfix operators "IS TRUE" and "IS FALSE" which test the boolean
value of the operand on the left.

<h3>Functions</h3>
<p>SQLite supports many [corefunc|simple], [aggfunc|aggregate],
and [window functions|window]
SQL functions.  For presentation purposes, simple functions are further
subdivided into [corefunc | core functions], [datefunc|date-time functions],
and [json1|JSON functions].
Applications can add new functions, written in C/C++, using the
[sqlite3_create_function()] interface.
</p>

<p>^It is possible to have an aggregate function with the same name as a
simple function, as long as the number of arguments for the two forms of the
function are different.  ^For example, the [agg_max|max()] function with a
2440
2441
2442
2443
2444
2445
2446
2447





2448
2449
2450
2451
2452
2453
2454
2455
  2 arguments.
}

funcdef {glob(X,Y)} {} {
  ^The glob(X,Y) function is equivalent to the
  expression "<b>Y GLOB X</b>".
  Note that the X and Y arguments are reversed in the glob() function
  relative to the infix [GLOB] operator.





  ^If the [sqlite3_create_function()] interface is used to
  override the glob(X,Y) function with an alternative implementation then
  the [GLOB] operator will invoke the alternative implementation.
}

funcdef {ifnull(X,Y)} {} {
  ^The ifnull() function returns a copy of its first non-NULL argument, or
  NULL if both arguments are NULL.  ^Ifnull() must have exactly 2 arguments.







|
>
>
>
>
>
|







2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
  2 arguments.
}

funcdef {glob(X,Y)} {} {
  ^The glob(X,Y) function is equivalent to the
  expression "<b>Y GLOB X</b>".
  Note that the X and Y arguments are reversed in the glob() function
  relative to the infix [GLOB] operator.  Y is the string and X is the
  pattern.  So, for example, the following expressions are equivalent:
  <blockquote><pre>
     name GLOB '*helium*'
     glob('*helium*',name)
  </pre></blockquote>
  <p>^If the [sqlite3_create_function()] interface is used to
  override the glob(X,Y) function with an alternative implementation then
  the [GLOB] operator will invoke the alternative implementation.
}

funcdef {ifnull(X,Y)} {} {
  ^The ifnull() function returns a copy of its first non-NULL argument, or
  NULL if both arguments are NULL.  ^Ifnull() must have exactly 2 arguments.
2496
2497
2498
2499
2500
2501
2502






2503
2504
2505
2506
2507
2508
2509
funcdef {like(X,Y) like(X,Y,Z)} {} {
  ^The like() function is used to implement the
  "<b>Y LIKE X &#91;ESCAPE Z&#93;</b>" expression. 
  ^If the optional ESCAPE clause is present, then the
  like() function is invoked with three arguments.  ^Otherwise, it is
  invoked with two arguments only. Note that the X and Y parameters are
  reversed in the like() function relative to the infix [LIKE] operator.






  ^The [sqlite3_create_function()] interface can be used to override the
  like() function and thereby change the operation of the
  [LIKE] operator.  When overriding the like() function, it may be important
  to override both the two and three argument versions of the like() 
  function. Otherwise, different code may be called to implement the
  [LIKE] operator depending on whether or not an ESCAPE clause was 
  specified.







>
>
>
>
>
>







2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
funcdef {like(X,Y) like(X,Y,Z)} {} {
  ^The like() function is used to implement the
  "<b>Y LIKE X &#91;ESCAPE Z&#93;</b>" expression. 
  ^If the optional ESCAPE clause is present, then the
  like() function is invoked with three arguments.  ^Otherwise, it is
  invoked with two arguments only. Note that the X and Y parameters are
  reversed in the like() function relative to the infix [LIKE] operator.
  X is the pattern and Y is the string to match against that pattern.
  Hence, the following expressions are equivalent:
  <blockquote><pre>
     name LIKE '%neon%'
     like('%neon%',name)
  </pre></blockquote>
  ^The [sqlite3_create_function()] interface can be used to override the
  like() function and thereby change the operation of the
  [LIKE] operator.  When overriding the like() function, it may be important
  to override both the two and three argument versions of the like() 
  function. Otherwise, different code may be called to implement the
  [LIKE] operator depending on whether or not an ESCAPE clause was 
  specified.
2785
2786
2787
2788
2789
2790
2791
2792

2793
2794
2795
2796
2797
2798
2799
  ^This SQL function is implemented using the [sqlite3_result_zeroblob()]
  routine from the C/C++ interface.
}
</tcl>

<p>The core functions shown below are available by default. 
[datefunc | Date &amp; Time functions],
[aggfunc | aggregate functions], and

[json1 | JSON functions] are documented separately.  An
application may define additional
functions written in C and added to the database engine using
the [sqlite3_create_function()] API.</p>

<tcl>
set lx {}







|
>







2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
  ^This SQL function is implemented using the [sqlite3_result_zeroblob()]
  routine from the C/C++ interface.
}
</tcl>

<p>The core functions shown below are available by default. 
[datefunc | Date &amp; Time functions],
[aggfunc | aggregate functions],
[builtin window functions|window functions], and
[json1 | JSON functions] are documented separately.  An
application may define additional
functions written in C and added to the database engine using
the [sqlite3_create_function()] API.</p>

<tcl>
set lx {}
3010
3011
3012
3013
3014
3015
3016
3017
3018



3019
3020
3021
3022
3023
3024
3025
so the date is normalized to 2001-05-01.  ^A similar effect occurs when
the original date is February 29 of a leapyear and the modifier is
&plusmn;N years where N is not a multiple of four.</p>

<p>^The "start of" modifiers (7 through 9) shift the date backwards 
to the beginning of the current month, year or day.</p>

<p>^The "weekday" modifier advances the date forward to the next date 
where the weekday number is N. Sunday is 0, Monday is 1, and so forth.</p>




<p>^The "unixepoch" modifier (11) only works if it immediately follows 
a timestring in the DDDDDDDDDD format. 
^This modifier causes the DDDDDDDDDD to be interpreted not 
as a Julian day number as it normally would be, but as
[http://en.wikipedia.org/wiki/Unix_time | Unix Time] - the 
number of seconds since 1970.  If the "unixepoch" modifier does not







|
|
>
>
>







3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
so the date is normalized to 2001-05-01.  ^A similar effect occurs when
the original date is February 29 of a leapyear and the modifier is
&plusmn;N years where N is not a multiple of four.</p>

<p>^The "start of" modifiers (7 through 9) shift the date backwards 
to the beginning of the current month, year or day.</p>

<p>^The "weekday" modifier advances the date forward, if necessary,
to the next date where the weekday number is N. Sunday is 0, Monday is 1,
and so forth.
^If the date is already on the desired weekday, the "weekday" modifier
leaves the date unchanged.  </p>

<p>^The "unixepoch" modifier (11) only works if it immediately follows 
a timestring in the DDDDDDDDDD format. 
^This modifier causes the DDDDDDDDDD to be interpreted not 
as a Julian day number as it normally would be, but as
[http://en.wikipedia.org/wiki/Unix_time | Unix Time] - the 
number of seconds since 1970.  If the "unixepoch" modifier does not
3636
3637
3638
3639
3640
3641
3642


3643
3644
3645
3646
3647
3648
3649
<ol>
<li> The "[select-stmt]"
     must be a [compound select] where the right-most [compound-operator] is
     either UNION or UNION ALL.
<li> The table named on the left-hand side of the AS keyword must appear
     exactly once in the FROM clause of the right-most SELECT statement
     of the compound select, and nowhere else.


</ol>

<p>To put it another way, a recursive common table expression must
look like the following:

<tcl>RecursiveBubbleDiagram recursive-cte</tcl>








>
>







3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
<ol>
<li> The "[select-stmt]"
     must be a [compound select] where the right-most [compound-operator] is
     either UNION or UNION ALL.
<li> The table named on the left-hand side of the AS keyword must appear
     exactly once in the FROM clause of the right-most SELECT statement
     of the compound select, and nowhere else.
<li> The right-most SELECT of the compound select must not make use of
     [Aggregate Functions|aggregate] or [window functions].
</ol>

<p>To put it another way, a recursive common table expression must
look like the following:

<tcl>RecursiveBubbleDiagram recursive-cte</tcl>

Changes to pages/news.in.

14
15
16
17
18
19
20






















21
22
23
24
25
26
27
  hd_puts "<h3>$date - $title</h3>"
  regsub -all "\n( *\n)+" $text "</p>\n\n<p>" txt
  regsub -all {[Tt]icket #(\d+)} $txt \
      {<a href="http://www.sqlite.org/cvstrac/tktview?tn=\1">\0</a>} txt
  hd_resolve "<blockquote>$txt</blockquote>"
  hd_puts "<hr width=\"50%\">"
}























newsitem {2018-09-18} {Release 3.25.1} {
SQLite [version 3.25.1] is a patch against version 3.25.0 that contains
two one-line fixes for bug that were introduced in version 3.25.0.
See the change log for details.  Upgrading from 3.25.0 is recommended.
}








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  hd_puts "<h3>$date - $title</h3>"
  regsub -all "\n( *\n)+" $text "</p>\n\n<p>" txt
  regsub -all {[Tt]icket #(\d+)} $txt \
      {<a href="http://www.sqlite.org/cvstrac/tktview?tn=\1">\0</a>} txt
  hd_resolve "<blockquote>$txt</blockquote>"
  hd_puts "<hr width=\"50%\">"
}

newsitem {2018-11-05} {Release 3.25.3} {
SQLite [version 3.25.3] is a third patch against 3.25.0 that fixes various
problems that have come to light and which seem serious enough to 
justify a patch.
}

newsitem {2018-09-25} {Release 3.25.2} {
SQLite [version 3.25.2] is another patch against 3.25.0 that fixes still
more problems associated with the new [window function] feature and the
[ALTER TABLE] enhancements.  Of particular note is the new
[PRAGMA legacy_alter_table=ON] command, which causes the ALTER TABLE RENAME
command to behave in the same goofy way that it did before the enhancements
found in version 3.25.0 &rarr; references to renamed tables that are inside
the bodies of triggers and views are not updated.  The legacy behavior is
arguably a bug, but some programs depend on the older buggy behavior.  The
3.25.2 release also contains a fix to [window function] processing for
VIEWs.  There also a slew of other minor fixes that affect obscure
compile-time options.  See the
[https://sqlite.org/src/timeline?r=branch-3.25|Fossil Timeline] for
details.
}

newsitem {2018-09-18} {Release 3.25.1} {
SQLite [version 3.25.1] is a patch against version 3.25.0 that contains
two one-line fixes for bug that were introduced in version 3.25.0.
See the change log for details.  Upgrading from 3.25.0 is recommended.
}

Changes to pages/pragma.in.

766
767
768
769
770
771
772






























773
774
775
776
777
778
779
  <p>^This pragma only operates on the single database specified prior
  to the pragma name (or on the "main" database if no database is specified.)
  There is no way to change the journal size limit on all attached databases
  using a single PRAGMA statement.  The size limit must be set separately for
  each attached database.
}
































Pragma legacy_file_format {
   <p>^(<b>PRAGMA legacy_file_format;
       <br>PRAGMA legacy_file_format = <i>boolean</i></b></p>
    <p>This pragma sets or queries the value of the legacy_file_format
    flag.)^  ^(When this flag is on, new SQLite databases are created in
    a file format that is readable and writable by all versions of







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
  <p>^This pragma only operates on the single database specified prior
  to the pragma name (or on the "main" database if no database is specified.)
  There is no way to change the journal size limit on all attached databases
  using a single PRAGMA statement.  The size limit must be set separately for
  each attached database.
}


Pragma legacy_alter_table {
   <p>^(<b>PRAGMA legacy_alter_table;
       <br>PRAGMA legacy_alter_table = <i>boolean</i></b></p>
    <p>This pragma sets or queries the value of the legacy_alter_table
    flag.)^  ^(When this flag is on, the ALTER TABLE RENAME
    command (for changing the name of a table) works as it did
    in SQLite 3.24.0 ([dateof:3.24.0]) and earlier.)^  More specifically,
    when this flag is on
    the ALTER TABLE RENAME command only rewrites the initial occurrence
    of the table name in its CREATE TABLE statement and in any associated
    CREATE INDEX and CREATE TRIGGER statements.  Other references to the
    table are unmodifed, including:
    <ul>
    <li> References to the table within the bodies of triggers and views.
    <li> References to the table within CHECK constraints in the original
         CREATE TABLE statement.
    <li> References to the table within the WHERE clauses of [partial indexes].
    </ul>
    The default setting for this pragma is OFF, which means that all
    references to the table anywhere in the schema are converted to the new name.
    <p>This pragma is provided as a work-around for older programs that
    contain code that expect the incomplete behavior
    of ALTER TABLE RENAME found in older versions of SQLite.
    New applications should leave this flag turned off.
    <p>For compability with older [virtual table] implementations,
    this flag is turned on temporarily while the [sqlite3_module.xRename]
    method is being run.  The value of this flag is restore after the 
    [sqlite3_module.xRename] method finishes.
}

Pragma legacy_file_format {
   <p>^(<b>PRAGMA legacy_file_format;
       <br>PRAGMA legacy_file_format = <i>boolean</i></b></p>
    <p>This pragma sets or queries the value of the legacy_file_format
    flag.)^  ^(When this flag is on, new SQLite databases are created in
    a file format that is readable and writable by all versions of

Changes to pages/prosupport.in.

240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
a suite of test cases for SQLite that provide 100% branch test coverage
(and 100% modified condition/decision coverage) for the core SQLite in
an as-deployed configuration using only published and documented interfaces.
TH3 is designed for use with embedded devices, and is compatible with
DO-178B.  Every release of the public-domain SQLite is tested using TH3,
and so all users benefit from the TH3 tests.  But the TH3 tests are not
themselves public.  Hardware or system manufactures who want to have
TH3 test run on their systems can negotiation a service agreement to have
the SQLite Developers run those tests.</p>

<h2>About The SQLite Team</h2>

<p>Paid support options and products are provided by
Hipp, Wyrick &amp; Company, Inc., (Hwaci), a 
<a href="http://en.wikipedia.org/wiki/Georgia_(U.S._state)">Georgia</a>







|







240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
a suite of test cases for SQLite that provide 100% branch test coverage
(and 100% modified condition/decision coverage) for the core SQLite in
an as-deployed configuration using only published and documented interfaces.
TH3 is designed for use with embedded devices, and is compatible with
DO-178B.  Every release of the public-domain SQLite is tested using TH3,
and so all users benefit from the TH3 tests.  But the TH3 tests are not
themselves public.  Hardware or system manufactures who want to have
TH3 test run on their systems can negotiate a service agreement to have
the SQLite Developers run those tests.</p>

<h2>About The SQLite Team</h2>

<p>Paid support options and products are provided by
Hipp, Wyrick &amp; Company, Inc., (Hwaci), a 
<a href="http://en.wikipedia.org/wiki/Georgia_(U.S._state)">Georgia</a>

Changes to pages/rescode.in.

740
741
742
743
744
745
746








































747
748
749
750
751
752
753
}
RESCODE SQLITE_READONLY_DIRECTORY {SQLITE_READONLY | (6<<8)} {
  The SQLITE_READONLY_DIRECTORY result code indicates that the database
  is read-only because process does not have permission to create
  a journal file in the same directory as the database and the creation of
  a journal file is a prerequisite for writing.
}









































#############################################################################
# Code to process the RESCODE values
#
# Convert formula RESCODE values into numerics
set nResCode 0
set nPrimCode 0







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
}
RESCODE SQLITE_READONLY_DIRECTORY {SQLITE_READONLY | (6<<8)} {
  The SQLITE_READONLY_DIRECTORY result code indicates that the database
  is read-only because process does not have permission to create
  a journal file in the same directory as the database and the creation of
  a journal file is a prerequisite for writing.
}

RESCODE SQLITE_ERROR_SNAPSHOT {SQLITE_ERROR | (3<<8)} {
  The SQLITE_ERROR_SNAPSHOT result code might be returned when attempting
  to start a read transaction on an historical version of the database
  by using the [sqlite3_snapshot_open()] interface.  If the historical
  snapshot is no longer available, then the read transaction will fail
  with the SQLITE_ERROR_SNAPSHOT.  This error code is only possible if
  SQLite is compiled with [-DSQLITE_ENABLE_SNAPSHOT].
}

RESCODE SQLITE_LOCKED_VTAB {SQLITE_LOCKED | (2<<8)} {
  The SQLITE_LOCKED_VTAB result code is not used by the SQLite core, but
  it is available for use by extensions.  Virtual table implementations
  can return this result code to indicate that they cannot complete the
  current operation because of locks held by other threads or processes.
  <p>
  The [R-Tree extension] returns this result code when an attempt is made
  to update the R-Tree while another prepared statement is actively reading
  the R-Tree.  The update cannot proceed because any change to an R-Tree
  might involve reshuffling and rebalancing of nodes, which would disrupt
  read cursors, causing some rows to be repeated and other rows to be
  omitted.
}

RESCODE SQLITE_CORRUPT_SEQUENCE {SQLITE_CORRUPT | (2<<8)} {
  The SQLITE_CORRUPT_SEQUENCE result code means that the schema of
  the sqlite_sequence table is corrupt.  The sqlite_sequence table
  is used to help implement the [AUTOINCREMENT] feature.  The
  sqlite_sequence table should have the following format:
  <blockquote><pre>
  CREATE TABLE sqlite_sequence(name,seq);
  </pre></blockquote>
  <p>If SQLite discovers that the sqlite_sequence table has any other
  format, it returns the SQLITE_CORRUPT_SEQUENCE error.
}

RESCODE SQLITE_CANTOPEN_DIRTYWAL {SQLITE_CANTOPEN | (5<<8)} {
  The SQLITE_CANTOPEN_DIRTYWAL result code is not used at this time.
}


#############################################################################
# Code to process the RESCODE values
#
# Convert formula RESCODE values into numerics
set nResCode 0
set nPrimCode 0

Changes to pages/rtree.in.

432
433
434
435
436
437
438
439
440
441
442
443
444
445
446

<p>^(For example, a query like the following might be used to find all
R*Tree entries that overlap with a circle centered a 45.3,22.9 with a
radius of 5.0:

<codeblock>
SELECT id FROM demo_index WHERE id MATCH circle(45.3, 22.9, 5.0)
</blockquote></pre>)^

<p>^The SQL syntax for custom queries is the same regardless of which
interface, sqlite3_rtree_geometry_callback() or sqlite3_rtree_query_callback(),
is used to register the SQL function.  However, the newer query-style
callbacks give the application greater control over how the query proceeds.

<h2>The Legacy xGeom Callback</h2>







|







432
433
434
435
436
437
438
439
440
441
442
443
444
445
446

<p>^(For example, a query like the following might be used to find all
R*Tree entries that overlap with a circle centered a 45.3,22.9 with a
radius of 5.0:

<codeblock>
SELECT id FROM demo_index WHERE id MATCH circle(45.3, 22.9, 5.0)
</codeblock>)^

<p>^The SQL syntax for custom queries is the same regardless of which
interface, sqlite3_rtree_geometry_callback() or sqlite3_rtree_query_callback(),
is used to register the SQL function.  However, the newer query-style
callbacks give the application greater control over how the query proceeds.

<h2>The Legacy xGeom Callback</h2>

Changes to pages/tclsqlite.in.

531
532
533
534
535
536
537




538
539
540
541
542
543
544
it is invoke.  The argument is the number of prior calls to the busy
callback for the current locking event.  It is intended that
the callback will do some other useful work for a short while 
(such as service GUI events) then return
so that the lock can be tried again.  The callback procedure should
return "0" if it wants SQLite to try again to open the database and
should return "1" if it wants SQLite to abandon the current operation.




}

##############################################################################
METHOD enable_load_extension {

<p>The extension loading mechanism of SQLite (accessed using the
[load_extension()] SQL function) is turned off by default.  This is







>
>
>
>







531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
it is invoke.  The argument is the number of prior calls to the busy
callback for the current locking event.  It is intended that
the callback will do some other useful work for a short while 
(such as service GUI events) then return
so that the lock can be tried again.  The callback procedure should
return "0" if it wants SQLite to try again to open the database and
should return "1" if it wants SQLite to abandon the current operation.
<p>
If the busy method is invoked without an argument, the name of the callback
procedure last set by the busy method is returned.  If no callback procedure
has been set, an empty string is returned.
}

##############################################################################
METHOD enable_load_extension {

<p>The extension loading mechanism of SQLite (accessed using the
[load_extension()] SQL function) is turned off by default.  This is

Changes to pages/vtab.in.

1373
1374
1375
1376
1377
1378
1379
1380









1381
1382
1383
1384
1385
1386
1387
</codeblock>

<p>This method provides notification that the virtual table implementation
that the virtual table will be given a new name. 
If this method returns [SQLITE_OK] then SQLite renames the table.
If this method returns an [error code] then the renaming is prevented.

<p>The xRename method is required for every virtual table implementation.










<tcl>############################################################# xSavepoint
hd_fragment xsavepoint {sqlite3_module.xSavepoint} {xSavepoint}\
  xRelease xRollbackTo</tcl>
<h2>The xSavepoint, xRelease, and xRollbackTo Methods</h2>

<codeblock>







|
>
>
>
>
>
>
>
>
>







1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
</codeblock>

<p>This method provides notification that the virtual table implementation
that the virtual table will be given a new name. 
If this method returns [SQLITE_OK] then SQLite renames the table.
If this method returns an [error code] then the renaming is prevented.

<p>The xRename method is optional.  If omitted, then the virtual
table may not be renamed using the ALTER TABLE RENAME command.

<p>The [PRAGMA legacy_alter_table] setting is enabled prior to invoking this
method, and the value for legacy_alter_table is restored after this
method finishes.  This is necessary for the correct operation of virtual
tables that make use of [shadow tables] where the shadow tables must be
renamed to match the new virtual table name.  If the legacy_alter_format is
off, then the xConnect method will be invoked for the virtual table every
time the xRename method tries to change the name of the shadow table.

<tcl>############################################################# xSavepoint
hd_fragment xsavepoint {sqlite3_module.xSavepoint} {xSavepoint}\
  xRelease xRollbackTo</tcl>
<h2>The xSavepoint, xRelease, and xRollbackTo Methods</h2>

<codeblock>

Changes to pages/wal.in.

363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<li>There is write permission on the directory containing the database so
    that the <tt>-shm</tt> and <tt>-wal</tt> files can be created.
<li>The database connection is opened using the
    [immutable query parameter].
</ol>

<p>Even though it is possible to open a read-only WAL-mode database,
it is good practice is to converted to 
[journal_mode | PRAGMA journal_mode=DELETE] prior to burning an
SQLite database image onto read-only media.</p>

<tcl>hd_fragment bigwal {large WAL files} {avoiding large WAL files}</tcl>
<h1>Avoiding Excessively Large WAL Files</h1>

<p>In normal cases, new content is appended to the WAL file until the







|







363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<li>There is write permission on the directory containing the database so
    that the <tt>-shm</tt> and <tt>-wal</tt> files can be created.
<li>The database connection is opened using the
    [immutable query parameter].
</ol>

<p>Even though it is possible to open a read-only WAL-mode database,
it is good practice to converted to 
[journal_mode | PRAGMA journal_mode=DELETE] prior to burning an
SQLite database image onto read-only media.</p>

<tcl>hd_fragment bigwal {large WAL files} {avoiding large WAL files}</tcl>
<h1>Avoiding Excessively Large WAL Files</h1>

<p>In normal cases, new content is appended to the WAL file until the

Changes to pages/windowfunctions.in.

1
2
3
4
5
6
7
8
<tcl>hd_keywords {window functions}</tcl>

<title>Window Functions</title>
<table_of_contents>

<h1>Introduction to Window Functions</h1>

<p>A window function is a special SQL function where the input
|







1
2
3
4
5
6
7
8
<tcl>hd_keywords {window functions} {window function}</tcl>

<title>Window Functions</title>
<table_of_contents>

<h1>Introduction to Window Functions</h1>

<p>A window function is a special SQL function where the input
313
314
315
316
317
318
319

320
321
322
323
324
325
326
for all ORDER BY expressions are considered peers regardless of the frame type.

<p> Most built-in window functions ignore the
<yynonterm>frame-spec</yynonterm>, the exceptions being first_value(),
last_value() and nth_value(). It is a syntax error to specify a FILTER 
clause as part of a built-in window function invocation.


<p> SQLite supports the following 11 built-in window functions:

<dl>
  <dt><p><b>row_number()</b>
  <dd><p> The number of the row within the current partition. Rows are
       numbered starting from 1 in the order defined by the ORDER BY clause in
       the window definition, or in arbitrary order otherwise.







>







313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
for all ORDER BY expressions are considered peers regardless of the frame type.

<p> Most built-in window functions ignore the
<yynonterm>frame-spec</yynonterm>, the exceptions being first_value(),
last_value() and nth_value(). It is a syntax error to specify a FILTER 
clause as part of a built-in window function invocation.

<tcl>hd_fragment biwinfunc {builtin window functions}</tcl>
<p> SQLite supports the following 11 built-in window functions:

<dl>
  <dt><p><b>row_number()</b>
  <dd><p> The number of the row within the current partition. Rows are
       numbered starting from 1 in the order defined by the ORDER BY clause in
       the window definition, or in arbitrary order otherwise.