Re: [sqlite] [EXTERNAL] Re: Strange concatenation result

2018-02-26 Thread Simon Slavin
On 27 Feb 2018, at 7:01am, Hick Gunter wrote: > What should substr('abcd',0,-2) return? 'cd' or just 'd'? Or maybe just an > empty string? NULL Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] Missing several important tricks in partial indexes

2018-02-26 Thread Shevek
If I create a partial index: create table a (a0, a1) create index idx on a (a0) where a1 is null; Then we have several issues: 1) This should be a covering index for select a0, a1 from a where a1 is null; It isn't. It's a great index, but we still defer to the table to look up the (always

Re: [sqlite] [EXTERNAL] Re: Strange concatenation result

2018-02-26 Thread Hick Gunter
Just to make things clear, I am not on the SQLite dev team, so I have no influence on the documentation. I am just extrapolating from experience. What should substr('abcd',0,-2) return? 'cd' or just 'd'? Or maybe just an empty string? If you start numbering at the left with 1, 0 is just left

Re: [sqlite] Strange concatenation result

2018-02-26 Thread curmudgeon
There's nothing special about Y=0. The Y can be anywhere outwith the string. e.g. substr('abc', 6, -4) = 'bc' substr('abc', -5, 3) = 'a' All substr functions should work this way. I wrote a c++ function to emulate it. String substr(const String , int Start, int Len) { if (Str=="" ||

Re: [sqlite] Format of sqlite-users digests.

2018-02-26 Thread Peter Da Silva
On 2/26/18, 12:24 PM, "Richard Hipp" wrote: > We use a 3rd party mailing list manager: GNU MailMan. You'll need to take > up your concerns with them, I'm afraid. I know nothing about the MailMan > code. Mailman supports mime-style digests, Randall may prefer to get those

Re: [sqlite] Format of sqlite-users digests.

2018-02-26 Thread Richard Hipp
On 2/26/18, Randall Smith wrote: > I don’t want to sound negative or get massively flamed, and I love getting > the daily SQLite mailing list digests, but has any thought been given to > making this material easier to read and digest? The 1970s style all-ASCII > format

[sqlite] Format of sqlite-users digests.

2018-02-26 Thread Randall Smith
I don’t want to sound negative or get massively flamed, and I love getting the daily SQLite mailing list digests, but has any thought been given to making this material easier to read and digest? The 1970s style all-ASCII format is I’m sure simple to assemble and maintain, but it is extremely

[sqlite] Final preparations for the release of System.Data.SQLite v1.0.108.0 have begun...

2018-02-26 Thread Joe Mistachkin
If you have any issues with the current trunk code, please report them via this mailing list (and/or by creating a ticket on "https://system.data.sqlite.org/;) prior to this Wednesday, February 28th. Thanks. -- Joe Mistachkin ___ sqlite-users mailing

Re: [sqlite] Strange concatenation result

2018-02-26 Thread Jean-Luc Hainaut
On 26/02/2018 12:19, Cezary H. Noweta wrote: Hello, On 2018-02-26 11:38, Hick Gunter wrote: The substr(x,y,z) function is defined only for nonzero values of y. SQlite can return whatever it feels like if you insist on providing invalid input. With "being nice to the user" and "making a best

Re: [sqlite] Strange concatenation result

2018-02-26 Thread Cezary H. Noweta
Hello, On 2018-02-26 11:38, Hick Gunter wrote: The substr(x,y,z) function is defined only for nonzero values of y. SQlite can return whatever it feels like if you insist on providing invalid input. With "being nice to the user" and "making a best effort to return sensible data even for

Re: [sqlite] Strange concatenation result

2018-02-26 Thread Cezary H. Noweta
Hello, It seems that Y=0 denotes a fictitious empty position before the first one (Y=1).Is it the intended behaviour? The documentation (https://www.sqlite.org/lang_corefunc.html#substr), says nothing about this specific pattern. Even if it not intended, it will be very handy in some

Re: [sqlite] [EXTERNAL] Re: Strange concatenation result

2018-02-26 Thread Hick Gunter
"The left-most character of X is number 1. If Y is negative then the first character of the substring is found by counting from the right rather than the left." The substr(x,y,z) function is defined only for nonzero values of y. SQlite can return whatever it feels like if you insist on

Re: [sqlite] Strange concatenation result

2018-02-26 Thread Jean-Luc Hainaut
About the "substr(X,Y,Z)" function, I observe a strange behaviour when Y = 0. If I execute this script: select 'abcd',substr('abcd',0,1),substr('abcd',1,1),substr('abcd',2,1); select 'abcd',substr('abcd',0,2),substr('abcd',1,2),substr('abcd',2,2); select