Error in docs for WHERE clause in CREATE INDEX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in docs for WHERE clause in CREATE INDEX

Jens Alfke-2
From https://www.sqlite.org/partialindex.html <https://www.sqlite.org/partialindex.html> :

> The WHERE clause may not contain subqueries, references to other tables, non-deterministic functions, or bound parameters. The LIKE, GLOB, MATCH, and REGEXP operators in SQLite are implemented as functions by the same name. Since functions are prohibited in the WHERE clause of a CREATE INDEX statement, so too are the LIKE, GLOB, MATCH, and REGEXP operators.

I believe the last sentence is false. The first sentence includes the qualifier “non-deterministic”, which was probably inserted when deterministic functions were introduced. But that invalidates the last sentence, since all the functions listed are deterministic.

(If the last sentence is deleted, then of course the second sentence becomes pointless and should be deleted too.)

—Jens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Error in docs for WHERE clause in CREATE INDEX

Richard Hipp-3
Fixed in the draft documentation.

On 10/4/17, Jens Alfke <[hidden email]> wrote:

> From https://www.sqlite.org/partialindex.html
> <https://www.sqlite.org/partialindex.html> :
>
>> The WHERE clause may not contain subqueries, references to other tables,
>> non-deterministic functions, or bound parameters. The LIKE, GLOB, MATCH,
>> and REGEXP operators in SQLite are implemented as functions by the same
>> name. Since functions are prohibited in the WHERE clause of a CREATE INDEX
>> statement, so too are the LIKE, GLOB, MATCH, and REGEXP operators.
>
> I believe the last sentence is false. The first sentence includes the
> qualifier “non-deterministic”, which was probably inserted when
> deterministic functions were introduced. But that invalidates the last
> sentence, since all the functions listed are deterministic.
>
> (If the last sentence is deleted, then of course the second sentence becomes
> pointless and should be deleted too.)
>
> —Jens
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users