Re: [sqlite] SQLite version 3.8.4 release schedule

2014-03-08 Thread Klaas V
| JN: "... the Cygwin VFS to behave the same as other UNIX'es" Warning: Off topic: RTF* and Gnu's Not Unix Two answers from Cygwin's FAQ Q: What? A The Cygwin tools are ports of the popular GNU development tools for Microsoft Windows. They run thanks to the Cygwin library which provides the P

Re: [sqlite] RPAD/LPAD

2014-03-08 Thread Max Vlasov
On Sat, Mar 8, 2014 at 10:52 AM, Max Vlasov wrote: > On Fri, Mar 7, 2014 at 11:51 PM, Dominique Devienne > wrote: >> >> basically register_function('rpad', 'x', 'y', 'printf(''%-*s'', y, >> x)') would register a 2-arg function (register_function's argc-2) >> named $argv[0], which executes the fo

[sqlite] SQL quine using with

2014-03-08 Thread Kees Nuyt
Someone called zzo38 posted a quine (self-replicating program) on Internet Relay Chat in network: Freenode, channel: #sqlite [2014-03-08 11:01:59] < zzo38> I made a quine program in SQL. [2014-03-08 11:02:10] < zzo38> with q(q) as (select 'with q(q) as (select ''#'') select replace(q,x''23'',r

[sqlite] curious idiom of the day...

2014-03-08 Thread Petite Abeille
with DataSet as ( select null as value union all select 'YES' as value union all select 'NO' as value union all select 'PERHAPS' as value ) select * fromDataSet where not exists ( select 1 where value = 'NO' ) ___

Re: [sqlite] SQL quine using with

2014-03-08 Thread Zsbán Ambrus
I have a favourite general method to write a quine in any programming language. This involves a list of strings and a list of numeric indexes. The second list is used to subscript into the first list, and the found strings are then extracted. This is possible in sqlite3, but comes out particular

[sqlite] Out of memory error for SELECT char();

2014-03-08 Thread Zsbán Ambrus
In the sqlite3 console, the following very simple statement gives "Error: out of memory": SELECT char(); I think this is a bug. This query should need very little memory, so it should not give such an error. I believe it should return a single row with a single value of an empty string. I've r

Re: [sqlite] SQL quine using with

2014-03-08 Thread Dan Kennedy
On 03/08/2014 08:53 PM, Kees Nuyt wrote: Someone called zzo38 posted a quine (self-replicating program) on Internet Relay Chat in network: Freenode, channel: #sqlite [2014-03-08 11:01:59] < zzo38> I made a quine program in SQL. [2014-03-08 11:02:10] < zzo38> with q(q) as (select 'with q(q) as (

Re: [sqlite] SQL quine using with

2014-03-08 Thread Zsbán Ambrus
Anyway, here's a different quine using the replace function. SELECT replace(s,char(33),)||s||'''s);'FROM(SELECT'SELECT replace(s,char(33),)||s||!!!s);!FROM(SELECT!'s); ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/c

Re: [sqlite] Out of memory error for SELECT char();

2014-03-08 Thread Simon Slavin
On 8 Mar 2014, at 6:25pm, Zsbán Ambrus wrote: > In the sqlite3 console, the following very simple statement gives > "Error: out of memory": > > SELECT char(); > > I think this is a bug. 162:~ simon$ sqlite3 ~/Desktop/test.sqlite SQLite version 3.7.13 2012-07-17 17:46:21 Enter ".help" for inst

Re: [sqlite] Out of memory error for SELECT char();

2014-03-08 Thread Zsbán Ambrus
On 3/8/14, Simon Slavin wrote: > SQLite version 3.7.13 2012-07-17 17:46:21 The char function was added in 3.7.16. > Could you please post your OS and the version of the SQLite shell tool > you're using ? I'm using Linux amd64, compiling with gcc 4.8.1. I've got the out of memory result in both

Re: [sqlite] Out of memory error for SELECT char();

2014-03-08 Thread Dan Kennedy
On 03/09/2014 01:25 AM, Zsbán Ambrus wrote: In the sqlite3 console, the following very simple statement gives "Error: out of memory": SELECT char(); I think this is a bug. It is. Thanks for the report. Now fixed here: http://www.sqlite.org/src/info/ba39df9d4f Dan. This query should

Re: [sqlite] Out of memory error for SELECT char();

2014-03-08 Thread Richard Hipp
On Sat, Mar 8, 2014 at 1:25 PM, Zsbán Ambrus wrote: > In the sqlite3 console, the following very simple statement gives > "Error: out of memory": > > SELECT char(); > > I think this is a bug. This query should need very little memory, so > it should not give such an error. I believe it should r

Re: [sqlite] SQL quine using with

2014-03-08 Thread Zsbán Ambrus
And here's a quine which simply concatenates six named strings a lot of times. SELECT ab||a||a||a||a||aa||b||a||b||a||bb||b|| a||aa||a||aa||aa||b||a||bb||a||bb||bb||b|| a||ab||a||aa||bb||b||a||ba||a||bb||aa||ba FROM(SELECTa,','b,'a'aa,'b'bb,'SELECT ab||a||a||a||a||aa||b||a||b||a||bb||b|| a||a

Re: [sqlite] Out of memory error for SELECT char();

2014-03-08 Thread Luuk
On 8-3-2014 19:48, Simon Slavin wrote: On 8 Mar 2014, at 6:25pm, Zsbán Ambrus wrote: In the sqlite3 console, the following very simple statement gives "Error: out of memory": SELECT char(); I think this is a bug. 162:~ simon$ sqlite3 ~/Desktop/test.sqlite SQLite version 3.7.13 2012-07-17

Re: [sqlite] Out of memory error for SELECT char();

2014-03-08 Thread mm.w
Hello, would be nicer to test N rather than guarding + 1UL size_t allocsize = 4 * N; if (!allocsize) { trigger(malformatted_sql_call_dumb_ass); // bail } Best Regards. On Sat, Mar 8, 2014 at 11:09 AM, Richard Hipp wrote: > On Sat, Mar 8, 2014 at 1:25 PM, Zsbán Ambrus wrote: > > >

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] SQL quine using with

2014-03-08 Thread Scott Robison
Here is one (sorta with inventive rule interpretation): sqlite3 /dev/null 'Error: near "Error": syntax error' Generates the command as output (at least with 3.8.2 from ports on FreeBSD): Error: near "Error": syntax errors Thank you! [takes bow] On Mar 8, 2014 12:16 PM, "Zsbán Ambrus" wrote: >