Re: [sqlite] SQLite3 Tutorial error

2017-01-07 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin > How about adding the above to the permanent docs? >>>SQLite docs do not usually include examples or tutorial information. It >>>would be more consistent just to take the text which is

Re: [sqlite] SQLite3 Tutorial error

2017-01-07 Thread James K. Lowden
On Fri, 06 Jan 2017 13:48:26 -0700 "Keith Medcalf" wrote: > Both "glob" and "like" call the same function, likeFunc with > different sets of user_data. likeFunc does a bunch of validation > then calls patternCompare which actually implements the like and glob >

Re: [sqlite] SQLite3 Tutorial error

2017-01-07 Thread Richard Hipp
On 1/7/17, Simon Slavin wrote: > > > > I have a question to add. How unicode-compliant are these functions ? There is the usual ASCIi-only case-folding for LIKE. But otherwise, the function should work with

Re: [sqlite] SQLite3 Tutorial error

2017-01-07 Thread Simon Slavin
On 7 Jan 2017, at 6:27am, dandl wrote: > How about adding the above to the permanent docs? SQLite docs do not usually include examples or tutorial information. It would be more consistent just to take the text which is currently comments in the source code file and include

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf >>>SQLite does not use the glob function from the standard library -- the >>>function is defined in func.c >>> >>>Both "glob" and "like" call the same function, likeFunc with different sets

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread Keith Medcalf
On Friday, 6 January, 2017 12:49, James K. Lowden wrote: > On Fri, 6 Jan 2017 10:23:06 +1100 > "dandl" wrote: > > > Unix globbing for Linux is defined here: > > http://man7.org/linux/man-pages/man7/glob.7.html. AFAICT Sqlite does > > not implement

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread Richard Hipp
On 1/6/17, James K. Lowden wrote: > > A quick scan of SQLite sources shows only references to the glob > function, no implementation. The implementation is built-in here: https://www.sqlite.org/src/artifact/d8582ee919759756?ln=610-770 For portability reasons, SQLite

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread James K. Lowden
On Fri, 6 Jan 2017 10:23:06 +1100 "dandl" wrote: > Unix globbing for Linux is defined here: > http://man7.org/linux/man-pages/man7/glob.7.html. AFAICT Sqlite does > not implement this behaviour. A quick scan of SQLite sources shows only references to the glob function, no

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Ken Wagner
David, Yes. That would be a big assist. I am new to using SQLite3 and found the GLOB function erratic in practice -- not on SQLite3 but on other web sites using SQLite. They yielded completely opposite results. Second the motion. Ken On 01/05/2017 05:23 PM, dandl wrote: From:

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Ken Wagner
ailing list <sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] SQLite3 Tutorial error Yes, I am beginning to understand that. SQLite3 is its own GLOB standard. I will abide by that. It is just very confusing when 5 other apps using SQLite as their DB engine all report the opposite.

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Jens Alfke
> On Jan 5, 2017, at 3:23 PM, dandl wrote: > > Perhaps some accurate documentation for GLOB in Sqlite would help to clarify > things? +1. I for one was unaware that glob understands the “[…]” syntax for character classes (both in SQLite and in the Unix glob(3) function),

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin >>>They’re probably using the external function interface to override the >>>internal globbing function. And by the look of the results at least one of >>>the programmers involved thinks that

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Simon Slavin
On 5 Jan 2017, at 7:30pm, dmp wrote: > I don't know what those other apps may be doing, but they should > just pass the query created by the user "DIRECTLY" to the SQLite DB > engine without any modification. Likewise the result should also > not be mucked with

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread dmp
> Message: 21 > Date: Wed, 4 Jan 2017 22:10:59 -0600 > From: Ken Wagner <beauco...@gmail.com> > To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> > Subject: Re: [sqlite] SQLite3 Tutorial error > Yes, I am beginning to understand that. SQLite3 is its own

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Ken Wagner
Ryan, Thanks. I have saved the Unix GLOB reference. When I inferred that other versions of SQLite gave the other results, it was thru the other SQLite GUI tools and the version of SQLite that they used. Thanks for helping to make clear what was going on. Ken On 01/05/2017 02:53 AM, R

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread R Smith
On 2017/01/05 9:04 AM, Ken Wagner wrote: Keith, It appears that the folks at SQLiteTutorial.net have a coding anomaly. They are not following the UNIX / SQLite3 GLOB patterns. And so, too, do the other guys. I am adjusting my usage accordingly. I will advise users of the other products to

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
b matching. ** ** This routine is usually quick, but can be N**2 in the worst case. */ -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of dandl Sent: Wednesday, 4 January, 2017 23:18 To: 'SQLite mailing list' Subject: Re: [sqlite] SQLi

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
l Message- From: sqlite-users [mailto:sqlite-users- boun...@mailinglists.sqlite.org] On Behalf Of Ken Wagner Sent: Wednesday, 4 January, 2017 21:24 To: SQLite mailing list Subject: Re: [sqlite] SQLite3 Tutorial error Aha! GLOB is an implementation of the UNIX Glob function. It just borrow

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Keith Medcalf
gt; On Behalf Of dandl > Sent: Wednesday, 4 January, 2017 23:18 > To: 'SQLite mailing list' > Subject: Re: [sqlite] SQLite3 Tutorial error > > A question: this appears to be the Posix standard for globbing ie Patterns > Used for Filename Expansion: > http://pubs.opengroup.or

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Keith Medcalf
te_source_id();"): ... print row ... Row(sqlite_version=u'3.17.0', sqlite_source_id=u'2017-01-04 04:18:00 80ad317f89c46db0d0d252aefdc036a34a61183d') > > -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of Ken Wagner &

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread dandl
A question: this appears to be the Posix standard for globbing ie Patterns Used for Filename Expansion: http://pubs.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_013_003 And this is Linux: https://linux.die.net/man/7/glob Is this what Sqlite intends to conform to? Because the

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Michael Falconer
little hearts did not desire >> the built in one? >> >> -Original Message- >>> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] >>> On Behalf Of Ken Wagner >>> Sent: Wednesday, 4 January, 2017 21:24 >>> To

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Ken Wagner Sent: Wednesday, 4 January, 2017 21:24 To: SQLite mailing list Subject: Re: [sqlite] SQLite3 Tutorial error Aha! GLOB is an implementation of the UNIX Glob function. It just borrows the regex character notation of [^1-9]. I hav

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf >>>Yes. The GLOB was invented on Unix. I posted an example of the Unix >>>filename globbing (which has not changed, to my knowledge, since the 60's), >>>which works exactly the same as the

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Keith Medcalf
te.org] > On Behalf Of Ken Wagner > Sent: Wednesday, 4 January, 2017 21:24 > To: SQLite mailing list > Subject: Re: [sqlite] SQLite3 Tutorial error > > Aha! GLOB is an implementation of the UNIX Glob function. It just > borrows the regex character notation of [^1-9]. > > I

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Aha! GLOB is an implementation of the UNIX Glob function. It just borrows the regex character notation of [^1-9]. I have 3.15 and 3.16 CLIs installed. Trying any other CLI versions at this point won't help for the customer. They will be using a SQLite3 GUI. I will explain the difference

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Yes, I am beginning to understand that. SQLite3 is its own GLOB standard. I will abide by that. It is just very confusing when 5 other apps using SQLite as their DB engine all report the opposite. The SQLite versions they use are 3.9.2, 3.10.1, 3.11.0 and 3.13.0. Example: the SQLite

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 9:14 PM, Keith Medcalf wrote: ~/test# uname -a Linux raspberrypi 4.9.0-v7+ #939 SMP Thu Dec 15 18:07:48 GMT 2016 armv7l GNU/Linux ~/test# echo . > 5AB ~/test# echo . > A5B ~/test# echo . > AB5 ~/test# echo . > 5 ~/test# echo . > ABC ~/test# ll *[1-9]* -rw-r--r-- 1 root root 2

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Keith Medcalf
> -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of R Smith > Sent: Wednesday, 4 January, 2017 10:52 > To: sqlite-users@mailinglists.sqlite.org > Subject: Re: [sqlite] SQLite3 Tutorial error > > >

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
Apologies Jens, the final paragraphs in this reply where I used "you" were intended to the OP (Ken Wagner) and not yourself, of course. On 2017/01/04 7:51 PM, R Smith wrote: On 2017/01/04 7:01 PM, Jens Alfke wrote: On Jan 4, 2017, at 5:57 AM, R Smith wrote: As I have

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 7:01 PM, Jens Alfke wrote: On Jan 4, 2017, at 5:57 AM, R Smith wrote: As I have it (and as is implemented by SQLite) the GLOB operator implements a REGEXP that matches against a regexp pattern No, these are NOT regular expressions in the usual sense of the

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Jens Alfke
> On Jan 4, 2017, at 5:57 AM, R Smith wrote: > > As I have it (and as is implemented by SQLite) the GLOB operator implements a > REGEXP that matches against a regexp pattern No, these are NOT regular expressions in the usual sense of the word. GLOB's syntax is

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 4:11 PM, Ken Wagner wrote: Simon, Yes, I am using the SQLite3 CLI. That's how I discovered the different GLOB outcomes. I now understand that the SQLite3 GLOB function is not fully documented so it's best to just experiment with the GLOB function at the CLI for SQLite3. And

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Richard, Why, thank you, for your very prompt reply and resolution for this 'nit'. If I can be of any assistance in testing (or taxing) the system, please do inform me. You have a jewel of a product and I enjoy using it immensely. Thanks for all the perseverance and patience. You must

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Richard Hipp
On 1/4/17, Simon Slavin wrote: > > On 4 Jan 2017, at 1:43pm, Ken Wagner wrote: > >> There is yet another product "DB Browser for SQLite" using SQLite v 3.9.2. >> It, too, omits any row where name contains any char 1 thru 9. It appears >> SQLite at one

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Ryan, Both 'AB6' or '5AB' fail the '[^1-9]' test. So, too do 'New Vol 4' and '#1'. Ken On 01/04/2017 07:57 AM, R Smith wrote: On 2017/01/04 3:43 PM, Ken Wagner wrote: Yes, I changed the query to NOT GLOB '*[1-9]*' and then it omitted the 1-9 char-containing entries. However the logic

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Ryan, The Regex description of '[^0-9]' states NOT any 0 thru 9 char in any SINGLE char position. It can be amended to 1-9 or 3-7 or 1-4 as the user sees fit. Tested it using Ruby and Rubular, a Regex Tester. HTH, Ken On 01/04/2017 07:57 AM, R Smith wrote: On 2017/01/04 3:43 PM, Ken

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Ryan, I will use the SQLite3 CLI as the acid test. But I still don't grasp why v 3.11.0 honors the GLOB by omitting any row where name contains a 1 thru 9 char but 3.15.0 and 3.16.0 do not. I expect I have missed a deprecation. It's just confusing and extra nit-picking and testing. Thanks

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Simon, Yes, I am using the SQLite3 CLI. That's how I discovered the different GLOB outcomes. I now understand that the SQLite3 GLOB function is not fully documented so it's best to just experiment with the GLOB function at the CLI for SQLite3. And avoid using SQLite3 versions prior to 3.15.

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Ryan, FWIW -- I upgraded the DB Browser from v. 3.9 to v 3.11.0. This too honors the GLOB '*[^1-9]*' by omitting any entry with a 1 thru 9 in it in any char position. This sqlitebrower is on git hub. It's a nice SQLite tool. (So far...) Ken On 01/04/2017 07:13 AM, R Smith wrote: Just one

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 3:43 PM, Ken Wagner wrote: Yes, I changed the query to NOT GLOB '*[1-9]*' and then it omitted the 1-9 char-containing entries. However the logic of 'zero or any chars, then any single char NOT 1 thru 9, then zero or any chars' should OMIT any name with a 1 thru 9 in it

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Simon Slavin
On 4 Jan 2017, at 1:43pm, Ken Wagner wrote: > There is yet another product "DB Browser for SQLite" using SQLite v 3.9.2. > It, too, omits any row where name contains any char 1 thru 9. It appears > SQLite at one point did this as 'GLOB '*[^1-9]*'. > > But it does not do

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Yes, I changed the query to NOT GLOB '*[1-9]*' and then it omitted the 1-9 char-containing entries. However the logic of 'zero or any chars, then any single char NOT 1 thru 9, then zero or any chars' should OMIT any name with a 1 thru 9 in it regardless if it is 'Vol. 3', for example, or

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
The "select trackid, name from tracks where name GLOB '*[^1-9]*';" query works as expected and does NOT include names with 1 thru 9 in them in SQLiteMan, a Linux/Ubuntu SQL manager. It uses SQLite as the DB backend. The logic of any # chars but NOT 1 thru 9 plus any # chars means NOT

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
Just one more point of clarity, in case my previous explanation did not high-light this: The query: select trackid, name from tracks where name GLOB '*[^1-9]*'; is completely different to the query: select trackid, name from tracks where name NOT GLOB '*[1-9]*'; The prior excludes only names

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 7:17 AM, Ken Wagner wrote: About 2/3 the way down the page at: http://www.sqlitetutorial.net/sqlite-glob/ Get names without [1-9]. select trackid, name from tracks where name GLOB '*[^1-9]*'; Works properly in SQLiteMan and the SQLite Tutorial. ( Two different

Re: [sqlite] SQLite3 Tutorial error

2017-01-03 Thread Ken Wagner
Thanks, Jens. I will do that. - Ken On 01/04/2017 12:29 AM, Jens Alfke wrote: On Jan 3, 2017, at 9:17 PM, Ken Wagner wrote: About 2/3 the way down the page at: http://www.sqlitetutorial.net/sqlite-glob/ Get names

Re: [sqlite] SQLite3 Tutorial error

2017-01-03 Thread Jens Alfke
> On Jan 3, 2017, at 9:17 PM, Ken Wagner wrote: > > About 2/3 the way down the page at: > > http://www.sqlitetutorial.net/sqlite-glob/ > Get names without [1-9]. You should probably report this to the people who run that

Re: [sqlite] SQLite3 Tutorial error

2017-01-03 Thread Ken Wagner
About 2/3 the way down the page at: http://www.sqlitetutorial.net/sqlite-glob/ Get names without [1-9]. select trackid, name from tracks where name GLOB '*[^1-9]*'; Works properly in SQLiteMan and the SQLite Tutorial. ( Two different products, not officially part of sqlite.org, I

Re: [sqlite] SQLite3 Tutorial error

2017-01-03 Thread Richard Hipp
On 1/3/17, Ken Wagner wrote: > Hi SQLite, > > In the SQLite3 Tutorial What tutorial are you referring to? -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org