[sqlite] Function lower on index expressions not allowed ?

2015-09-10 Thread Jan Nijtmans
2015-09-08 0:04 GMT+02:00 Richard Hipp : > My guess: You are using ICU or some other extension that is replacing > the built-in lower() function with another. And that extension is not > marking its new lower() function as SQLITE_DETERMINISTIC. >

[sqlite] Function lower on index expressions not allowed ?

2015-09-10 Thread Igor Tandetnik
On 9/10/2015 7:52 AM, Jan Nijtmans wrote: > Just wondering, why doesn't ICU mark "upper" and "lower" > as SQLITE_DETERMINISTIC ? > My guess would be, because this code predates the existence of SQLITE_DETERMINISTIC

[sqlite] Function lower on index expressions not allowed ?

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! The create_collation functions have a signature similar to create_function but no mention abount add SQLITE_DETERMINISTIC to then, they do not need it ? Cheers ! > Tue Sep 08 2015 12:04:44 am CEST CEST from "Richard Hipp" > Subject: Re: [sqlite] Function lower on i

[sqlite] Function lower on index expressions not allowed ?

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! I'm converting a database from postgresql and when I tried to create this index it fails: CREATE UNIQUE INDEX country_name_idx on country(lower(name)); Error: "non-deterministic functions prohibited in index expressions" Can the lower function be non deterministic ? I know

[sqlite] Function lower on index expressions not allowed ?

2015-09-07 Thread Igor Tandetnik
On 9/7/2015 6:58 PM, Domingo Alvarez Duarte wrote: > The create_collation functions have a signature similar to create_function > but no mention abount add SQLITE_DETERMINISTIC to then, they do not need it ? Collations are assumed to be deterministic - it makes no sense for them not to be. What

[sqlite] Function lower on index expressions not allowed ?

2015-09-07 Thread Richard Hipp
On 9/7/15, Domingo Alvarez Duarte wrote: > Hello ! > > The create_collation functions have a signature similar to create_function > but no mention abount add SQLITE_DETERMINISTIC to then, they do not need it > ? That flag only works on functions. -- D. Richard Hipp drh at sqlite.org

[sqlite] Function lower on index expressions not allowed ?

2015-09-07 Thread Richard Hipp
On 9/7/15, Domingo Alvarez Duarte wrote: > Hello ! > > I'm converting a database from postgresql and when I tried to create this > index it fails: > > CREATE UNIQUE INDEX country_name_idx on country(lower(name)); > > Error: "non-deterministic functions prohibited in index expressions" > > Can the