[sqlite] Suggestion about check-in 1fa74930ab

2018-11-02 Thread sqlite
This check-in is done so that trigger programs can use table-valued-functions. But it seems to me that the correct way should be to check if it is a eponymous virtual table; whether it uses table-valued-function syntax or not is irrelevant. Since, eponymous virtual tables do not belong to any pa

Re: [sqlite] Suggestion: Pre-release Snapshots versioning

2017-08-05 Thread jose isaias cabrera
Richard Hipp wrote... On 8/4/17, jose isaias cabrera wrote: Right now, when I went to a machine that I had upgraded with a snapshot, I saw that the version was 3.20.0. But when I compared the DLL file size and date, they were different. It would be nice for pre-releases to have something to

Re: [sqlite] Suggestion: Pre-release Snapshots versioning

2017-08-04 Thread Richard Hipp
On 8/4/17, jose isaias cabrera wrote: > > Right now, when I went to a machine that I had upgraded with a > snapshot, I saw that the version was 3.20.0. But when I compared the DLL > file size and date, they were different. It would be nice for pre-releases > to have something to distinguish them

[sqlite] Suggestion: Pre-release Snapshots versioning

2017-08-04 Thread jose isaias cabrera
Greetings! Thanks for this wonderful tool! Dr. Hipp and team, thanks. A suggestion I have is that the pre-release snapshots have some type of versioning. Right now, when I went to a machine that I had upgraded with a snapshot, I saw that the version was 3.20.0. But when I compared the DLL fi

Re: [sqlite] Suggestion for PRAGMA SYNCHRONOUS=0 documentation

2017-07-14 Thread Clemens Ladisch
Rowan Worth wrote: > I do think it's worth a mention in the PRAGMA SYNCHRONOUS=0 documentation > that sqlite3_close() doesn't propagate I/O errors so you might never hear > about write failures in this mode. When writing asynchronously, errors can be detected _after_ the close, so this is not even

[sqlite] Suggestion for PRAGMA SYNCHRONOUS=0 documentation

2017-07-14 Thread Rowan Worth
Hi guys, Ran into an interesting case today where one of our programs was writing an sqlite DB to a network file system. Just as it was finishing up there was a brief connectivity issue, and sqlite's call to close() ran into an EIO error. Sqlite3_close() doesn't return an error in this case so it

[sqlite] Suggestion: Regularize output of setting pragmas.

2015-09-17 Thread Scott Hess
Often, PRAGMA are documented like mmap_size, like: > Query or change the maximum number of bytes that are set aside > for memory-mapped I/O on a single database. The first > form (without an argument) queries the current limit. The > second form (with a numeric argument) sets the limit for the > s

[sqlite] Suggestion for .import improvement

2015-05-11 Thread James K. Lowden
On Mon, 11 May 2015 22:24:53 +0300 wrote: > Current .import behavior is that when the imported table does not > exist, it will be created using the first row from the data file as > column names for the new table. Huh, somehow I'd forgotten that! > Once the initial table is created by the fir

[sqlite] Suggestion for .import improvement

2015-05-11 Thread to...@acm.org
I would like to request this improvement to the shell .import command. (Wish list, I guess.) Current .import behavior is that when the imported table does not exist, it will be created using the first row from the data file as column names for the new table. This is great but it has one probl

[sqlite] Suggestion for .import improvement

2015-05-11 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/11/2015 12:24 PM, tonyp at acm.org wrote: > It?s a real nuisance to have to edit out the headers every time, > especially when the files are very large and they do not load fast > (or at all) into a text editor. Plus, it?s semi-automatic. I sug

Re: [sqlite] Suggestion for syntax enhancement for virtual tables

2015-01-02 Thread Peter Aronson
at function delete the backing store (even if a non-temporary >> virtual table is still connected)? >> >> -Ursprüngliche Nachricht- >> Von: Baruch Burstein [mailto:bmburst...@gmail.com] >> Gesendet: Donnerstag, 01. Jänner 2015 08:38 >> An: General Discuss

Re: [sqlite] Suggestion for syntax enhancement for virtual tables

2015-01-01 Thread Dan Kennedy
store (even if a non-temporary virtual table is still connected)? -Ursprüngliche Nachricht- Von: Baruch Burstein [mailto:bmburst...@gmail.com] Gesendet: Donnerstag, 01. Jänner 2015 08:38 An: General Discussion of SQLite Database Betreff: [sqlite] Suggestion for syntax enhancement for

Re: [sqlite] Suggestion for syntax enhancement for virtual tables

2015-01-01 Thread Hick Gunter
)? -Ursprüngliche Nachricht- Von: Baruch Burstein [mailto:bmburst...@gmail.com] Gesendet: Donnerstag, 01. Jänner 2015 08:38 An: General Discussion of SQLite Database Betreff: [sqlite] Suggestion for syntax enhancement for virtual tables For creating temporary virtual tables, currently you need to do

[sqlite] Suggestion for syntax enhancement for virtual tables

2014-12-31 Thread Baruch Burstein
For creating temporary virtual tables, currently you need to do: CREATE VIRTUAL TABLE temp.t ... Can this syntax be made to work too (similar to creating regular tables)? CREATE VIRTUAL TEMP TABLE t ... or CREATE TEMP VIRTUAL TABLE t ... -- ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı __

Re: [sqlite] Suggestion for SHELL impovement (built-in scripting)

2014-06-19 Thread tonyp
, and when something adds too many complications it will inevitably take forever (if ever) to implement. -Original Message- From: J Decker Sent: Thursday, June 19, 2014 3:45 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Suggestion for SHELL impovement (bui

Re: [sqlite] Suggestion for SHELL impovement (built-in scripting)

2014-06-18 Thread J Decker
Stored procedures variables, a goto(jump/branch) and a conditional so loops can be made; On the topic of shell results; isn't there a result value of like number of records inserted ? So something like var a = insert... select $a; and then test the output sort of? went searching cause I real

Re: [sqlite] Suggestion for SHELL impovement (built-in scripting)

2014-06-18 Thread Nico Williams
My suggestion is to have a sqlite_... table in which to start statements to run at DB open time, so as to: - automatically CREATE temp tables, indexes, views - automatically ATTACH related DBs - automatically load extensions (this should require explicit acquiescence from the API caller though)

Re: [sqlite] Suggestion for SHELL impovement (built-in scripting)

2014-06-18 Thread Roger Binns
On 06/18/2014 02:47 PM, to...@acm.org wrote: But you need bash, or TCL, or Perl, or Python, or whatever other than sqlite3.exe So, you're suggesting that an innocent SQLite user should install any of those programming packages just to run SQLite. Hmm... no, thanks! Yes. Quite simply you'll st

Re: [sqlite] Suggestion for SHELL impovement (built-in scripting)

2014-06-18 Thread jose isaias cabrera
to...@acm.org wrote... Hi all, ... So here’s my suggestion for what (I feel) is a significant improvement for the SHELL version of SQLite without being too much of a programming complication in my view. (Those who usually attack any new concept, please pause a moment and give it some thoug

[sqlite] Suggestion for SHELL impovement (built-in scripting)

2014-06-18 Thread tonyp
Hi all, First of all, this is not about using SQLite as an embedded library from C, or whatever other language. It does not affect the sqlite3.c file at all. It only applies to the shell (so logically, it only affects shell.c) So here’s my suggestion for what (I feel) is a significant improv

Re: [sqlite] Suggestion for shell .IMPORT improvement

2014-05-22 Thread Stephan Beal
On Thu, May 22, 2014 at 4:55 PM, Dominique Devienne wrote: > On Thu, May 22, 2014 at 3:26 PM, Noel Frankinet > wrote: > > I propose Musqlar, the Mighty universal sql Archiver :-) > > Sounds like Musk-lar, so you loose the S.Q.L. of sqlar which sounds to > me like C-quel-ar ;) > Maybe this i

Re: [sqlite] Suggestion for shell .IMPORT improvement

2014-05-22 Thread Dominique Devienne
On Thu, May 22, 2014 at 3:26 PM, Noel Frankinet wrote: > I propose Musqlar, the Mighty universal sql Archiver :-) Sounds like Musk-lar, so you loose the S.Q.L. of sqlar which sounds to me like C-quel-ar ;) ___ sqlite-users mailing list sqlite-users@

Re: [sqlite] Suggestion for shell .IMPORT improvement

2014-05-22 Thread Noel Frankinet
I propose Musqlar, the Mighty universal sql Archiver :-) On 22 May 2014 15:22, Dominique Devienne wrote: > On Thu, May 22, 2014 at 1:51 PM, Richard Hipp wrote: > > How about "sqlar" for "SQL Archive"? http://www.sqlite.org/sqlar > > I like it! Sounds ominous when pronounced out loud :). > >

Re: [sqlite] Suggestion for shell .IMPORT improvement

2014-05-22 Thread Dominique Devienne
On Thu, May 22, 2014 at 1:51 PM, Richard Hipp wrote: > How about "sqlar" for "SQL Archive"? http://www.sqlite.org/sqlar I like it! Sounds ominous when pronounced out loud :). Much better name IMHO, and no negative connotation in French that I know of. --DD _

Re: [sqlite] Suggestion for shell .IMPORT improvement

2014-05-22 Thread Richard Hipp
On Thu, May 22, 2014 at 7:46 AM, Richard Hipp wrote: > > > > On Thu, May 22, 2014 at 7:36 AM, Dominique Devienne > wrote: > >> On Thu, May 22, 2014 at 12:39 PM, Richard Hipp wrote: >> > Hyperlink has changed. It is now called "sfa" instead of "sar": >> >> I can't read "sfa" w/o remembering tv

Re: [sqlite] Suggestion for shell .IMPORT improvement

2014-05-22 Thread Richard Hipp
On Thu, May 22, 2014 at 7:36 AM, Dominique Devienne wrote: > On Thu, May 22, 2014 at 12:39 PM, Richard Hipp wrote: > > Hyperlink has changed. It is now called "sfa" instead of "sar": > > I can't read "sfa" w/o remembering tv ads [1] for the toilet > equivalent to a sink garbage disposal :) > Go

Re: [sqlite] Suggestion for shell .IMPORT improvement

2014-05-22 Thread Dominique Devienne
On Thu, May 22, 2014 at 12:39 PM, Richard Hipp wrote: > Hyperlink has changed. It is now called "sfa" instead of "sar": I can't read "sfa" w/o remembering tv ads [1] for the toilet equivalent to a sink garbage disposal :) Some acronyms don't cross language barriers w/o harm, like Audi's "e-tron

Re: [sqlite] Suggestion for shell .IMPORT improvement

2014-05-22 Thread Richard Hipp
On Thu, May 22, 2014 at 4:22 AM, Kees Nuyt wrote: > On Sun, 18 May 2014 01:06:42 +0300, wrote: > > > PS. By the way, any progress on the shell enhancement to load/save blobs? > > This will make the shell capable of handling any database without the > need > > for external programs. > > I think S

Re: [sqlite] Suggestion for shell .IMPORT improvement

2014-05-22 Thread Kees Nuyt
On Sun, 18 May 2014 01:06:42 +0300, wrote: > PS. By the way, any progress on the shell enhancement to load/save blobs? > This will make the shell capable of handling any database without the need > for external programs. I think SQLite File Archiver comes very close: http://www.sqlite.org/sar/

[sqlite] Suggestion for shell .IMPORT improvement

2014-05-17 Thread tonyp
Hello, When .importing from a csv file (for example) with a command like ".import data.csv data" if the table does not exist, the table is created using the first row of data.csv as the field names. But if the same file is imported a second time, the first line is treated as data. My suggest

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-11 Thread big stone
Hello, Thanks to Keith's help I succeeded to set up a comparison a "native" sqrt() versus a "python" mysqrt() function . The speed-up in a best case non-realistic scenario is only 40%. create_function() looks very performant. Regards, ___ sqlite-users

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-10 Thread Keith Medcalf
te.org >Subject: Re: [sqlite] Suggestion to add "locate" as a broader version of >"instr" > >Hello Keith, > >Thanks for the ".timer on" tip. > >I only succeed to get a "Error: not such function : sqrt" from

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-10 Thread big stone
Hello Keith, Thanks for the ".timer on" tip. I only succeed to get a "Error: not such function : sqrt" from default Sqlite.exe How did you get that "native" sqrt working ? regards, ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.or

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-09 Thread Simon Slavin
On 10 Mar 2014, at 1:38am, Stephen Chrzanowski wrote: > Apologies for the interruption and sort of off topic, but, is .timer part > of the CLI only or is it part of the SQL language? Can I get the result of > a timer from a call, or do I have to put a wrapper on my wrapper? Commands which star

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-09 Thread Keith Medcalf
ue between 1 and 10; >> 55 >> Run Time: real 89.341 user 89.343750 sys 0.00 >> >> A native sqrt takes about 60 ns per operation. >> >> >-Original Message- >> >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-user

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-09 Thread Stephen Chrzanowski
g] On Behalf Of big stone > >Sent: Sunday, 9 March, 2014 03:35 > >To: sqlite-users@sqlite.org > >Subject: Re: [sqlite] Suggestion to add "locate" as a broader version of > >"instr" > > > >Hello Max, > > > >Your link is pretty

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-09 Thread Keith Medcalf
000 Run Time: real 89.341 user 89.343750 sys 0.00 A native sqrt takes about 60 ns per operation. >-Original Message- >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >boun...@sqlite.org] On Behalf Of big stone >Sent: Sunday, 9 March, 2014 03:35 >To: sqlite-users

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-09 Thread big stone
Hello Max, Your link is pretty interesting. It looks that : - method1 should be easily implemented with SQLite "floating point" representation, - and with a very very small code size. Here is the benchmarking of the two available methods : https://raw.github.com/stonebig/ztest_donotuse/master/sq

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-08 Thread Max Vlasov
On Sat, Mar 8, 2014 at 2:24 AM, big stone wrote: > Ooups ! > > Thanks to the awesome posts about "RPAD/LPAD", I understood that I could > already create a "sqrt()" function for SQLite3 in interpreted python. > Yes, that discussion was inspiring :) Looking at your task I also played with cte v

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-03-07 Thread big stone
Ooups ! Thanks to the awesome posts about "RPAD/LPAD", I understood that I could already create a "sqrt()" function for SQLite3 in interpreted python. (example) *** import sqlite3 db_filename = ':memory:' def mysqrt(s): """ returns sqrt(s)""" #must return a string, apparently

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-02-15 Thread Gabor Grothendieck
On Fri, Feb 14, 2014 at 2:33 PM, Max Vlasov wrote: > Hi, > > Some time ago when there was no "instr" functions, I looked at Mysql help > pages and implemented a user function "locate" as the one that allows > searching starting a particular position in the string. With two parameters > form it was

Re: [sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-02-15 Thread big stone
+1 . A few more 'classic/simple' sql instructions would not be a bad thing : sqrt(), locate(substring, string, start), ... They are not in a sql official "normalisation", but : - '%' is not either, - avg() looks a little bit incomplete without sqrt(). _

[sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-02-14 Thread Max Vlasov
Hi, Some time ago when there was no "instr" functions, I looked at Mysql help pages and implemented a user function "locate" as the one that allows searching starting a particular position in the string. With two parameters form it was just identical to "instr" only the order of parameters was rev

[sqlite] Suggestion for cache_size pragma documentation

2013-03-02 Thread Richard Allen
Regarding the 'cache_size' pragma documentation@http://www.sqlite.org/pragma.html - Could a note be added stating the version number(3.7.10) where a negative cache_size began to mean a number of kByte instead of a number of pages? In earlier versions, a negative cache_size was interpreted as numbe

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-04 Thread Black, Michael (IS)
behalf of Григорий Григоренко [grigore...@mail.ru] Sent: Sunday, November 04, 2012 1:34 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite]SUGGESTION: "now" as alias for "strftime('%s','now')" Fri, 2 Nov 2012 14:11:26 + от "

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-04 Thread Roger Andersson
-Ursprungligt meddelande- From: Baruch Burstein Sent: Sunday, November 04, 2012 10:43 AM To: Григорий Григоренко ; General Discussion of SQLite Database Subject: Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')" CURRENT_TIMEST

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-04 Thread Baruch Burstein
ubstract; > etc. > > > > > > > > > Michael D. Black > > > Senior Scientist > > > Advanced Analytics Directorate > > > Advanced GEOINT Solutions Operating Unit > > > Northrop Grumman Information Systems > > > > > _______

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-04 Thread Григорий Григоренко
Unit > Northrop Grumman Information Systems > > > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Григорий Григоренко [grigore...@mail.ru] > Sent: Friday, November 02, 2012 8:08 AM > To: General Discussio

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-04 Thread Григорий Григоренко
Fri, 2 Nov 2012 10:25:18 -0400 от Richard Hipp : > > >On Fri, Nov 2, 2012 at 10:18 AM, Simon Davies >wrote: > datetime() will give current date and time >> likewise date(), time() etc >> >If I read the original post correctly, I think the OP is requesting a new >function, "now()", that retur

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-04 Thread Григорий Григоренко
Fri, 02 Nov 2012 15:32:44 +0100 от Clemens Ladisch : >Igor Tandetnik wrote: > > SQLite does in fact accept CURRENT_TIMESTAMP in DEFAULT clause. > > > > http://sqlite.org/lang_createtable.html#tablecoldef > > SQLite does in fact accept CURRENT_TIMESTAMP anywhere: >http://www.sqlite.org/lang_expr.

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-02 Thread Clemens Ladisch
Igor Tandetnik wrote: > SQLite does in fact accept CURRENT_TIMESTAMP in DEFAULT clause. > > http://sqlite.org/lang_createtable.html#tablecoldef SQLite does in fact accept CURRENT_TIMESTAMP anywhere: http://www.sqlite.org/lang_expr.html Regards, Clemens ___

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-02 Thread Richard Hipp
On Fri, Nov 2, 2012 at 10:18 AM, Simon Davies wrote: > datetime() will give current date and time > likewise date(), time() etc > If I read the original post correctly, I think the OP is requesting a new function, "now()", that returns the number of seconds since 1970. This would be the same as

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-02 Thread Simon Davies
On 2 November 2012 13:08, Григорий Григоренко wrote: > > Thu, 1 Nov 2012 19:57:42 + от Simon Slavin : > >> > Please read >> >> > >> > Surely, I did) Don't get me wrong - my point is not that Sqlite is lacking > functions that modify or format date va

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-02 Thread Black, Michael (IS)
oun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Григорий Григоренко [grigore...@mail.ru] Sent: Friday, November 02, 2012 8:08 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite]SUGGESTION: "now" as alias for "strftime('%s','now')&qu

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-02 Thread Igor Tandetnik
Григорий Григоренко wrote: > Compare: > MS SQL: CURRENT_TIMESTAMP SQLite does in fact accept CURRENT_TIMESTAMP in DEFAULT clause. Does this satisfy your requirements? http://sqlite.org/lang_createtable.html#tablecoldef -- Igor Tandetnik ___ sqlite-

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-02 Thread Григорий Григоренко
Thu, 1 Nov 2012 19:57:42 + от Simon Slavin : > On 1 Nov 2012, at 7:55pm, Григорий Григоренко wrote: > > > it is a common practice to store datetime values as UNIX time UTC. > > Maybe, Sqlite should have some shortcut for evaluating current moment? > > Please read > >

Re: [sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-01 Thread Simon Slavin
On 1 Nov 2012, at 7:55pm, Григорий Григоренко wrote: > it is a common practice to store datetime values as UNIX time UTC. > Maybe, Sqlite should have some shortcut for evaluating current moment? Please read Simon. ___

[sqlite] SUGGESTION: "now" as alias for "strftime('%s','now')"

2012-11-01 Thread Григорий Григоренко
Hello, it is a common practice to store datetime values as UNIX time UTC.  Maybe, Sqlite should have some shortcut for evaluating current moment? Some alias for strftime('%s','now') ? Like, "now" or "unixnow":   created_at   DEFAULT  (now())     vs     created_at    DEFAULT   (strftime('%s','now'

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-23 Thread Igor Tandetnik
On 4/23/2012 2:34 PM, Pete wrote: Folks, I'm a bit late to this discussion but what are the new PRAGMAs referred to here? They were discussed hypothetically. As in, wouldn't it be nice if there were pragmas to control date and time formats. -- Igor Tandetnik _

[sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-23 Thread Pete
2 20:38:37 +0400 > From: Alexey Pechnikov > To: sqlite-users@sqlite.org > Subject: [sqlite] Suggestion about hard-coded time string format >-MM-DD > Message-ID: > > > Content-Type: text/plain; charset=ISO-8859-1 > > Why we can't control this? As

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-20 Thread Yves Goergen
On 02.04.2012 18:38 CE(S)T, Alexey Pechnikov wrote: > Why we can't control this? As example, in Russia the date format is > DD.MM. and is needed the patch > http://sqlite.mobigroup.ru/fdiff?v1=288ad2e1e017565c&v2=720cb1015e95af7a > > I think the new pragmas DATEFORMAT and TIMEFORMAT will be he

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-12 Thread Alexey Pechnikov
2012/4/2 Jay A. Kreibich > It would make more sense to just implement a strptime() SQL function > to compliment the existing strftime() function. That would allow > SQLite to understand and convert any incoming date-time format > without depending on specific build parameters. > > But may st

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/04/12 14:34, Simon Slavin wrote: > I wonder whether it respects languages. A German user living in France has some Swedish names in their list to be sorted. Do you use Swedish sort order, German sort order, German name order or French order? T

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Nico Williams
On Mon, Apr 2, 2012 at 5:46 PM, Simon Slavin wrote: > Replace part of that routine with something which specifies the locale rather > than fetching it from OS settings.  And store the locale used with the index, > as a COLLATE setting.  Thus leaving it up to whoever writes the CREATE > command

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Simon Slavin
On 2 Apr 2012, at 10:44pm, Igor Tandetnik wrote: > On 4/2/2012 5:34 PM, Simon Slavin wrote: >> Hmm. It's there: >> >> >> >> "The following function compares two Unicode strings of possibly different >> lengths.

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Nico Williams
On Mon, Apr 2, 2012 at 1:25 PM, Richard Hipp wrote: > On Mon, Apr 2, 2012 at 2:03 PM, Simon Slavin wrote: >> I think ... a higher priority than that would be handling Unicode >> correctly.  And having Unicode support would be useful in writing the code >> which handles dates. >> > size of SQLite

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Nico Williams
On Mon, Apr 2, 2012 at 4:24 PM, Simon Slavin wrote: > On 2 Apr 2012, at 9:58pm, Alexey Pechnikov wrote: >> Description: Unicode string library for C >> The 'libunistring' library implements Unicode strings (in the UTF-8, >> UTF-16, and UTF-32 encodings), together with functions for >> Unicode cha

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Jean-Christophe Deschamps
At 23:44 02/04/2012, you wrote: I wonder whether it respects languages. These don't, but u8_strcoll et al supposedly do, based on LC_COLLATE locale category. Herein lies the problem: if you build an index using these functions while running under locale A, then try to run queries against t

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Igor Tandetnik
On 4/2/2012 5:34 PM, Simon Slavin wrote: Hmm. It's there: "The following function compares two Unicode strings of possibly different lengths. — Function: int u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Simon Slavin
On 2 Apr 2012, at 10:24pm, Simon Slavin wrote: > On 2 Apr 2012, at 9:58pm, Alexey Pechnikov wrote: > >> Description: Unicode string library for C >> The 'libunistring' library implements Unicode strings (in the UTF-8, >> UTF-16, and UTF-32 encodings), together with functions for >> Unicode cha

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Simon Slavin
On 2 Apr 2012, at 9:58pm, Alexey Pechnikov wrote: > Description: Unicode string library for C > The 'libunistring' library implements Unicode strings (in the UTF-8, > UTF-16, and UTF-32 encodings), together with functions for > Unicode characters (character names, classifications, properties) an

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Nico Williams
On Mon, Apr 2, 2012 at 3:58 PM, Alexey Pechnikov wrote: > And see too: > > Homepage: http://www.gnu.org/software/libunistring/ Thanks! That looks like a dream come true (even if LGPL). It's much more complete than the OpenSolaris u8_textprep stuff, which would be particularly useful for SQLite3

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Alexey Pechnikov
And see too: # LANG=C aptitude show libunistring0 Package: libunistring0 New: yes State: not installed Version: 0.9.3-3 Priority: optional Section: libs Maintainer: Andreas Rottmann Uncompressed Size: 1221 k Depends: libc6 (>= 2.3) Description: Unicode string library for C The 'libunistring' lib

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Nico Williams
On Mon, Apr 2, 2012 at 1:25 PM, Richard Hipp wrote: > On Mon, Apr 2, 2012 at 2:03 PM, Simon Slavin wrote: >> I think ... a higher priority than that would be handling Unicode >> correctly.  And having Unicode support would be useful in writing the code >> which handles dates. >> >> > size of SQLi

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Simon Slavin
On 2 Apr 2012, at 7:25pm, Richard Hipp wrote: > On Mon, Apr 2, 2012 at 2:03 PM, Simon Slavin wrote: > >> I think ... a higher priority than that would be handling Unicode >> correctly. And having Unicode support would be useful in writing the code >> which handles dates. > > size of SQLite l

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Alexey Pechnikov
Why you need ICU library to parse datetime strings?!! The my previous patch to parse Russian dates has only single row without any external libs. 2012/4/2 Richard Hipp > On Mon, Apr 2, 2012 at 2:03 PM, Simon Slavin wrote: > > > > > I think ... a higher priority than that would be handling Unico

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Richard Hipp
On Mon, Apr 2, 2012 at 2:03 PM, Simon Slavin wrote: > > I think ... a higher priority than that would be handling Unicode > correctly. And having Unicode support would be useful in writing the code > which handles dates. > > size of SQLite library: approx 500 KB size of ICU library: approx 21,9

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Simon Slavin
On 2 Apr 2012, at 6:18pm, Alexey Pechnikov wrote: > Please see http://www.sqlite.org/lang_datefunc.html and you will be > frustrated because SQLite can format date/time to different string formats > but can't read the produced date/time strings. I am not frustrated. That function does not requ

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Alexey Pechnikov
> 2012/4/2 Simon Slavin Please see http://www.sqlite.org/lang_datefunc.html and you will be frustrated because SQLite can format date/time to different string formats but can't read the produced date/time strings. -- Best regards, Alexey Pechnikov. http://pechnikov.tel/

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Jay A. Kreibich
On Mon, Apr 02, 2012 at 08:38:37PM +0400, Alexey Pechnikov scratched on the wall: > Why we can't control this? As example, in Russia the date format is > DD.MM. and is needed the patch > http://sqlite.mobigroup.ru/fdiff?v1=288ad2e1e017565c&v2=720cb1015e95af7a > > I think the new pragmas DATEF

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Simon Slavin
On 2 Apr 2012, at 5:38pm, Alexey Pechnikov wrote: > Why we can't control this? As example, in Russia the date format is > DD.MM. and is needed the patch > http://sqlite.mobigroup.ru/fdiff?v1=288ad2e1e017565c&v2=720cb1015e95af7a > > I think the new pragmas DATEFORMAT and TIMEFORMAT will be h

[sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Alexey Pechnikov
Why we can't control this? As example, in Russia the date format is DD.MM. and is needed the patch http://sqlite.mobigroup.ru/fdiff?v1=288ad2e1e017565c&v2=720cb1015e95af7a I think the new pragmas DATEFORMAT and TIMEFORMAT will be helpful for internationalization. These may be used for parsing

Re: [sqlite] Suggestion for project: Chat

2010-08-24 Thread Alan Chandler
On 24/08/10 17:21, Artur Reilin wrote: > I thinking about coding a chat with sqlite. You know the most hosts not > allow you to use chats or something that way, because they write and read > to often data from mysql database. > > So my thought is to make a chat which use forums software mysql table

Re: [sqlite] Suggestion for project: Chat

2010-08-24 Thread Artur Reilin
> On Tue, Aug 24, 2010 at 10:23:55PM +0530, Roger Binns wrote: >> On 08/24/2010 09:51 PM, Artur Reilin wrote: >> > I thinking about coding a chat with sqlite. >> >> The hard part of implementing chat is not storing the messages, but >> rather dealing with all the clients at the same time especiall

Re: [sqlite] Suggestion for project: Chat

2010-08-24 Thread Nicolas Williams
On Tue, Aug 24, 2010 at 10:23:55PM +0530, Roger Binns wrote: > On 08/24/2010 09:51 PM, Artur Reilin wrote: > > I thinking about coding a chat with sqlite. > > The hard part of implementing chat is not storing the messages, but > rather dealing with all the clients at the same time especially with

Re: [sqlite] Suggestion for project: Chat

2010-08-24 Thread Richard Hipp
FWIW: The SQLite Core developers all keep in touch using a private, proprietary chatroom that is backed by an SQLite database. The chat server is written in 152 lines of Tcl code and the client (involving a GUI and therefore being more complex) is 1068 lines of Tcl/Tk. We have other means of com

Re: [sqlite] Suggestion for project: Chat

2010-08-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/24/2010 09:51 PM, Artur Reilin wrote: > I thinking about coding a chat with sqlite. The hard part of implementing chat is not storing the messages, but rather dealing with all the clients at the same time especially with potentially hostile net

[sqlite] Suggestion for project: Chat

2010-08-24 Thread Artur Reilin
I thinking about coding a chat with sqlite. You know the most hosts not allow you to use chats or something that way, because they write and read to often data from mysql database. So my thought is to make a chat which use forums software mysql tables for user data, but writes and read chat text f

Re: [sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Max Vlasov
> In the case of SQLite, it is also very unlikely to save space. In > fact, because of the way integer values are stored, it is very > likely to use more space. > Jay, In most cases yes, but there are ones with several integers that should be used together in ordering, the space is wasted sin

Re: [sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Jay A. Kreibich
On Tue, Jul 20, 2010 at 04:43:26PM +0400, Max Vlasov scratched on the wall: > Hi, > as long as I see currently bitwise right does not use index Doing this requires recognizing when an inverse expression exists, and then computing it. It is extremely difficult in the general case. If you wa

Re: [sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Max Vlasov
On Tue, Jul 20, 2010 at 5:14 PM, Pavel Ivanov wrote: > > Are there reasons not to implement optimization in the first case? Except > > for this is not most requested one :) > > I guess because this case is highly specific and it's behavior should > depend on particular constants used. Put there f

Re: [sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Pavel Ivanov
> Are there reasons not to implement optimization in the first case? Except > for this is not most requested one :) I guess because this case is highly specific and it's behavior should depend on particular constants used. Put there for example Id >> 54 = 1000 and now we should make optimizer gues

[sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Max Vlasov
Hi, as long as I see currently bitwise right does not use index CREATE TABLE [TestTable] ([Id] INTEGER PRIMARY KEY AUTOINCREMENT); EXPLAIN QUERY PLAN SELECT * FROM TestTable WHERE Id >> 12 = 1000; : TABLE TestTable Sure I can replace it with the following query EXPLAIN QUERY PLAN SELECT * FROM

Re: [sqlite] Suggestion for sqlite shell

2010-07-12 Thread Max Vlasov
On Mon, Jul 12, 2010 at 5:00 PM, Alexey Pechnikov wrote: > Maxim, please show example here and the link to your implementation. > > Alexey, to illustrate I prepared a screen shot http://www.maxerist.net/downloads/temp/bind_iterate.png excel and cells to be copied are at the top, at the center t

Re: [sqlite] Suggestion for sqlite shell

2010-07-12 Thread Alexey Pechnikov
Maxim, please show example here and the link to your implementation. -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Suggestion for sqlite shell

2010-07-12 Thread Max Vlasov
Hi, recently I implemented a feature for an gui admin I use internally, but I think it would be useful also for sqlite shell. Sorry if it already exists in some form, I could not find similar. The idea is to use bind syntax together with csv (or clipboard compatible) import. So if one enters a qu

Re: [sqlite] suggestion - make pragma case_sensitive_like queryable

2010-03-23 Thread Bogdan Ureche
> > > The setting is detectable: > > Simon, thank you for the reply. It's not exactly the answer I was hoping for, but I suppose fixing this is a low priority if there is a workaround. Regards, Bogdan ___ sqlite-users mailing list sqlite-users@sqlite.or

Re: [sqlite] suggestion - make pragma case_sensitive_like queryable

2010-03-23 Thread Simon Davies
On 22 March 2010 21:53, Bogdan Ureche wrote: > The pragma case_sensitive_like is not queryable, unlike other pragmas. Is > there any reason why it's not? > > If not, I would like to suggest to be made queryable, for consistency. > > Bogdan The setting is detectable: sqlite> sqlite> select 'a' li

[sqlite] suggestion - make pragma case_sensitive_like queryable

2010-03-22 Thread Bogdan Ureche
The pragma case_sensitive_like is not queryable, unlike other pragmas. Is there any reason why it's not? If not, I would like to suggest to be made queryable, for consistency. Bogdan ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.or

Re: [sqlite] suggestion on the database design

2009-08-20 Thread pierr
John Machin wrote: > > On 21/08/2009 1:29 PM, pierr wrote: >> >> Simon Slavin-2 wrote: >>> >>> On 21 Aug 2009, at 3:26am, pierr wrote: >>> I did not know the sequence in defining the field matters. This is what I should have done. >>> Sorry, I should have explained better. You were r

  1   2   >