[sqlite] Happy birthday to the SQLite Fossil repo

2019-08-17 Thread jungle boogie

Just fun trivia that drh pointed out elsewhere late last month...

Ten years ago today, the first commit for SQLite was made in the Fossil 
repo:


https://www.sqlite.org/src/timeline?c=b0848925babde524
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-04-27 Thread Jungle Boogie

On Sat 27 Apr 2019  7:44 AM, Richard Hipp wrote:

On 4/26/19, Carl Chave  wrote:

Should "index.cgi" from line number 1923 in subject check in include a
leading forward slash?  My index.cgi scripts aren't being found with
this version (or any subsequent version) unless I explicitly include
it as part of the request uri.  I added the slash and recompiled and
it started working again as it had in previous versions.


Fixed.

I'm surprised to hear that there is somebody else actually using
althttpd!  Now with two users, maybe it is time to separate the
althttpd.c code and documentation out into a separate repository
(rather than commingling it with the SQLite documentation), get a
domain name, and set up a website just for althttpd.c :-)


Would you ever consider adding support to list an index of a directory?
http://127.0.0.1/files would display whatever is in the /files directory.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-24 Thread Jungle Boogie
On Sun 23 Dec 2018  7:15 PM, Larry Brasfield wrote:
> Jungle Boogie wrote:
> ➢ Anyone else have issues decompressing the file? $ bzip2 -d employees.db.bz2 
> bzip2: employees.db.bz2 is not a bzip2 file. bunzip2 employees.db.bz2 
> bunzip2: employees.db.bz2 is not a bzip2 file. $ file employees.db.bz2 
> employees.db.bz2: Non-ISO extended-ASCII HTML document text $ sha256 
> employees.db.bz2 SHA256 (employees.db.bz2) = 
> 2c24eaa81d65459ec412e1e4e7a0955349f40ccff02abe98b72b0af5e84495f2
> 
> I browsed to the web page, link to which you quoted.  At that page (on 
> GitHub) I clicked the “Clone or download” button, then clicked the “Download 
> ZIP” option, whereupon a .zip file could be downloaded.  Within that .zip 
> archive, in a subdirectory, was a file which appeared as follows to the 
> ‘file’ utility:
> > file employees.db
> employees.db: SQLite 3.x database


I think my problem that I was using the wrong URL.
Correct URL to fetch is this:
https://github.com/siara-cc/employee_db/raw/master/employees.db.bz2

Thanks Larry and Arun.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-23 Thread Jungle Boogie
On Wed 19 Dec 2018  2:34 PM, Arun - Siara Logics (cc) wrote:
> This project (https://github.com/siara-cc/employee_db) hosts the Sqlite3 db 
> file ported from mysql test_db found at 
> https://github.com/datacharmer/test_db. It can be used to test your 
> applications and database servers. To use this project, download 
> employees.db.bz2, unzip and open using sqlite3 command line tool. 
>

Anyone else have issues decompressing the file?

$ bzip2 -d employees.db.bz2 
bzip2: employees.db.bz2 is not a bzip2 file.

bunzip2 employees.db.bz2

  
bunzip2: employees.db.bz2 is not a bzip2 file.

$ file employees.db.bz2 


employees.db.bz2: Non-ISO extended-ASCII HTML document text

$ sha256 employees.db.bz2   


SHA256 (employees.db.bz2) =
2c24eaa81d65459ec412e1e4e7a0955349f40ccff02abe98b72b0af5e84495f2
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Doing math in sqlite

2018-12-21 Thread Jungle Boogie
On Thu 20 Dec 2018  4:21 PM, Jungle Boogie wrote:
> Hi All,
> 
> This is more of a how do I do this in sql question. I apologize in advance
> for a simple question, but I need to learn somehow, so any pointers are 
> appreciated.


Thank you all for the helpful replies and education on doing math with sqlite. 

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Doing math in sqlite

2018-12-20 Thread Jungle Boogie
On Thu 20 Dec 2018  6:26 PM, Barry Smith wrote:
> 
> 
> > On 20 Dec 2018, at 4:21 pm, Jungle Boogie  wrote:
> > 
> > Hi All,
> > 
> > Some sample data:
> > 2018/04/15,foo,170644
> > 2018/04/15,bar.69625
> > 2018/04/22,foo,170821
> > 2018/04/22,bar,69914
> > 2018/04/29,foo,171006
> > 2018/04/29,bar,70123
> > 2018/05/06,foo,171129
> > 2018/05/06,bar,70223
> > 2018/05/09,foo,171178
> > 2018/05/20,foo,171304
> > 2018/05/20,bar,70517
> > 
> 
> I wouldn't call my solution elegant, but if you put a unique constraint on 
> the "date" column, and want your query to return null if there is not a 
> record exactly on that date:
> 
> SELECT
>(SELECT od_reading FROM mileage WHERE date = '2018/05/20' AND car='bar')
>-
>(SELECT od_reading FROM mileage WHERE date='2018/05/06' AND car='bar')
> As ExactMileage
> 
> You can rephrase that as:
> SELECT end.od_reading - start.od_reading FROM mileage AS start, mileage AS 
> end WHERE end.date='2018/05/20' AND start.date='2018/05/06' AND end.car 
> ='bar' and start.car='bar'
> 
> Or even you could use CTEs to repeat yourself less:
> WITH OnlyBar AS SELECT * FROM mileage WHERE car='bar'
> SELECT end.od_reading - start.od_reading FROM OnlyBar AS start, OnlyBar AS 
> end WHERE end.date='2018/05/20' AND start.date='2018/05/06
> 
> If you might query between two dates that don't necessarily have a record, 
> the best you can do is give a range of what the possible driven distance may 
> be:
> SELECT
>(SELECT MIN(od_reading) FROM mileage WHERE date >= '2018/05/20' AND 
> car='bar')
>-
>(SELECT MAX(od_reading) FROM mileage WHERE date <= '2018/05/06' AND 
> car='bar')
> AS MaxPossible,
>(SELECT MAX(od_reading) FROM mileage WHERE date <= '2018/05/20' AND 
> car='bar')
>-
>(SELECT MIN(od_reading) FROM mileage WHERE date >= '2018/05/06' AND 
> car='bar')
> AS MinPossible
> 
> The second query finds the records before and after the dates in question (or 
> uses data on exactly that date) to figure out the minimum and maximum 
> possible distances that may have been driven between the dates of interest.
> 
> Note that there is a more efficient form of the second query, where one 
> selects just od_reading and orders by date, with a limit of 1 instead of 
> using the MIN and MAX functions; if your table is going to be large then that 
> is a better option (with an index on (car, date), the value can then be 
> computed with an index seek instead of a table scan). I used the min/max 
> version because it's simpler and easier to read
> 

Thanks all for for the helpful replies!

All of them work, as expected, but I see I wasn't exactly clear with my second
part of the question.

Is it possible to determine how many miles were driven the previous week with
current week's data in one query.

For example with foo:
2018/05/20 - 2018/05/09 = 126
2018/05/09 - 2018/04/29 = 172
2018/04/29 - 2018/04/22 = 185

Basically some kind of for loop through all the matches of 'foo'

> > 
> > Thanks,
> > j.b.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Doing math in sqlite

2018-12-20 Thread Jungle Boogie
Hi All,

This is more of a how do I do this in sql question. I apologize in advance
for a simple question, but I need to learn somehow, so any pointers are 
appreciated.

My very simple schema:

CREATE TABLE mileage (
date text,
"car" text,
"od_reading" integer
)

Some sample data:
2018/04/15,foo,170644
2018/04/15,bar.69625
2018/04/22,foo,170821
2018/04/22,bar,69914
2018/04/29,foo,171006
2018/04/29,bar,70123
2018/05/06,foo,171129
2018/05/06,bar,70223
2018/05/09,foo,171178
2018/05/20,foo,171304
2018/05/20,bar,70517

I can select the first and last od_readings pertaining to a particular car this
way:
select od_reading from mileage where car='foo' limit 1
select od_reading from mileage where car='bar' order by od_reading desc limit 1

How do I subtract the last query from the first query to determine how many
miles were driven?

Next, is there an elegant way to see how many miles difference there is between
two readings of the same car?

For instance, how many miles difference are there between bar on 2018/05/20 and
2018/05/06?

Thanks,
j.b.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite version 3.25.0 enters release testing

2018-09-11 Thread jungle Boogie
On Tue, 11 Sep 2018 at 11:08, Richard Hipp  wrote:
>
> We are in final testing for SQLite 3.25.0.  Details on this release
> can be seen at
>
> https://www.sqlite.org/draft/releaselog/3_25_0.html
>
> There will be no further enhancements before the release.  Bug fixes
> only.  You can follow the progress of testing at
>
> https://www.sqlite.org/checklists/325/index
>

Both of those webpages look really nice on mobile browsers!
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Mailing list shutting down...

2018-06-13 Thread jungle Boogie
On 13 June 2018 at 04:22, Richard Hipp  wrote:
> Unfortunately, I'm going to need to shut down this mailing list due to
> robot harassment.  I am working to come up with a fix or an
> alternative now.  Your suggestions are welcomed.
>


OpenBSD uses Majordomo for their mailing lists:
https://en.wikipedia.org/wiki/Majordomo_(software)

However, on the page below they indicate how they fight spam - with
spamd and SpamAssassin.
https://www.openbsd.org/mail.html

https://man.openbsd.org/spamd
http://spamassassin.apache.org/

Maybe those can give you an idea on how to fight the spam submitted to
your subscribers.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite.org website is now HTTPS-only

2018-06-07 Thread jungle Boogie
On 7:24PM, Thu, Jun 7, 2018 George  wrote:
>
> On Thu, 7 Jun 2018 14:31:22 -0400
> Richard Hipp  wrote:
>
> > As an experiment, I have reconfigured the sqlite.org website to
> > redirect all HTTP requests over to HTTPS.
> >
> > Let me know if this causes anybody any unnecessary grief.  It is easy
> > enough to undo the setting.
> >
>
> Why can't we have both? I mean the software is in the public domain
> there is nothing to hide so what's the point of encrypting the site?

Chrome and Firefox already display an open/broken looking padlock on
non-http websites, so I think this is a good measure to prevent less than
knowledgable people from assuming the site has a problem.

>
> Cheers and thank for you generosity and work.
> Best regards,
> George
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite.org website is now HTTPS-only

2018-06-07 Thread jungle Boogie
On 1:38PM, Thu, Jun 7, 2018 Keith Medcalf  wrote:
>
>
> Just tell wget --no-check-certificate in the command line.  wget does not
use a certificate repository and you need to obtain and specify the
expected root manually.  It will be no less secure than it was before (when
using HTTP) except that now it will use Transport encryption.  Certificate
checking is useless for proving identity anyway unless you have obtained
the root and validated the chain yourself and not rely on crud from
untrustworthy third-parties.
>
> THat is, change the comand line to
>
> wget -O - --no-check-certificate https://sqlite.org/download.html
>

Good, quick solution.

If you also do this, check out downloading the download.zip or targz file,
which is generated by fossil. You'll get the latest of whichever branch you
specify.

> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven
says a lot about anticipated traffic volume.
>
>
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Congratulations on 18 years

2018-05-30 Thread jungle Boogie
On 30 May 2018 at 03:27, Christian Schmitz
 wrote:
> Hello,
>
> Congratulations to the SQLite team.
>
> As far as I see, the first checkin was 2000-05-29, which was over 18 years 
> ago.

Way to go! What a truly awesome project this has been!

>
> Sincerely
> Christian
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite3 fossil repository not working ?

2018-05-09 Thread Jungle Boogie
On Tue 08 May 2018  9:32 AM, Domingo Alvarez Duarte wrote:
> Hello !
> 
> Today I tried to update my sqlite3 repository but somehow it seems not
> working properly, I execute "fossil update" as usually and it contacts the
> server and exchange info with it but it only see till this commit
> http://www.sqlite.org/src/info/c381f0ea57002a264fd958b28e .
> 
> There is more than one fossil server and they are not synchronized ?

Have you tried the "fossil update trunk" command? This ensures you're on the
right branch. From a recent post, DRH advised the three repositories are synced
hourly to one another.

> 
> Cheers !
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] unknown type name 'sqlite_int64'

2018-05-01 Thread jungle boogie

Thus said Igor Korot on Mon, 30 Apr 2018 20:28:54 -0500

Why did you need configure?


Turns out I needed to disable editline and readline, but it eventually 
builds! thanks for the input.


And yes, I am ignoring you awareessi555 AT safenmeet.xyz


Just do make.

Thank you.



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] unknown type name 'sqlite_int64'

2018-04-30 Thread jungle Boogie
On 5:20PM, Mon, Apr 30, 2018 Igor Korot <ikoro...@gmail.com> wrote:
>
> Hi,
>
> On Mon, Apr 30, 2018 at 6:30 PM, jungle Boogie <jungleboog...@gmail.com>
wrote:
> > Hi All,
> >
> > What's happening here?
> >
> > $ cc --version
> > OpenBSD clang version 6.0.0 (tags/RELEASE_600/final) (based on LLVM
6.0.0)
> > Target: aarch64-unknown-openbsd6.3
> > Thread model: posix
> >
> > ARM64 bit on a pine64-lts device running:
> > OpenBSD 6.3-current (GENERIC.MP) #91: Mon Apr 30 01:29:06 MDT 2018
> >
> >
> >
> > sqlite3.c  -fPIC -DPIC -o .libs/sqlite3.o
>
> What is the full exact command you are using to compile?
> Do you have sqlite3.h in the same directory as sqlite3.c?
>
> Thank you.

Doing a ./configure without any options and simply a make. This is with the
download.tar.gz file, and the make takes place in in that directory.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] unknown type name 'sqlite_int64'

2018-04-30 Thread jungle Boogie
Hi All,

What's happening here?

$ cc --version
OpenBSD clang version 6.0.0 (tags/RELEASE_600/final) (based on LLVM 6.0.0)
Target: aarch64-unknown-openbsd6.3
Thread model: posix

ARM64 bit on a pine64-lts device running:
OpenBSD 6.3-current (GENERIC.MP) #91: Mon Apr 30 01:29:06 MDT 2018



sqlite3.c  -fPIC -DPIC -o .libs/sqlite3.o
sqlite3.c:2086:9: error: unknown type name 'sqlite_int64'
typedef sqlite_int64 i64;  /* 8-byte signed integer */
^
sqlite3.c:2087:9: error: unknown type name 'sqlite_uint64'
typedef sqlite_uint64 u64; /* 8-byte unsigned integer */
^
sqlite3.c:2524:3: error: unknown type name 'sqlite3_vfs'
  sqlite3_vfs *pVfs,   /* VFS to use with this b-tree */
  ^
sqlite3.c:2526:3: error: unknown type name 'sqlite3'
  sqlite3 *db, /* Associated database connection */
  ^
sqlite3.c:2756:3: error: unknown type name 'sqlite3_int64'
  sqlite3_int64 nKey; /* Size of pKey for indexes.  PRIMARY KEY for tabs */
  ^
sqlite3.c:2758:3: error: unknown type name 'sqlite3_value'
  sqlite3_value *aMem;/* First of nMem value in the unpacked pKey */
  ^
sqlite3.c:2819:44: error: unknown type name 'sqlite3'
SQLITE_PRIVATE   void sqlite3BtreeEnterAll(sqlite3*);
   ^
sqlite3.c:2834:44: error: unknown type name 'sqlite3'
SQLITE_PRIVATE   void sqlite3BtreeLeaveAll(sqlite3*);
   ^
sqlite3.c:2913:5: error: unknown type name 'sqlite3_context'
sqlite3_context *pCtx; /* Used when p4type is P4_FUNCCTX */
^
sqlite3.c:3296:44: error: unknown type name 'sqlite3'
SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3*,Vdbe*);
   ^
sqlite3.c:3313:16: error: unknown type name 'sqlite3'
SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*);
   ^
sqlite3.c:3318:16: error: must use 'struct' tag to refer to type 'sqlite3_value'
SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe*, int, u8);
   ^
   struct
sqlite3.c:3337:39: error: unknown type name 'sqlite3_context'
SQLITE_PRIVATE int sqlite3NotPureFunc(sqlite3_context*);
  ^
sqlite3.c:3527:3: error: unknown type name 'sqlite3_vfs'
  sqlite3_vfs*,
  ^
sqlite3.c:3535:53: error: unknown type name 'sqlite3'
SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager, sqlite3*);
^
sqlite3.c:3547:55: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
SQLITE_PRIVATE void sqlite3PagerSetMmapLimit(Pager *, sqlite3_int64);
  ^
sqlite3.c:3555:16: error: unknown type name 'sqlite3_backup'
SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager*);
   ^
sqlite3.c:3587:60: error: unknown type name 'sqlite3'
SQLITE_PRIVATE   int sqlite3PagerCheckpoint(Pager *pPager, sqlite3*,
int, int*, int*);
   ^
sqlite3.c:3591:58: error: unknown type name 'sqlite3'
SQLITE_PRIVATE   int sqlite3PagerCloseWal(Pager *pPager, sqlite3*);
 ^
sqlite3.c:3616:16: error: unknown type name 'sqlite3_vfs'
SQLITE_PRIVATE sqlite3_vfs *sqlite3PagerVfs(Pager*);
   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.

-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-22 Thread jungle Boogie
On 16 March 2018 at 08:37, Richard Hipp  wrote:
> This is a survey, the results of which will help us to make SQLite faster.
>
> How many tables in your schema(s) use AUTOINCREMENT?
>

0
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Feature request for the Shell Tool: .mode json

2018-01-21 Thread Jungle Boogie
On Sun 21 Jan 2018  4:21 PM, Simon Slavin wrote:
> 
> 
> On 21 Jan 2018, at 3:05pm, Brian Curley  wrote:
> 
> > pipe it
> > through jq instead.
> 
> I did not know jq existed.  Thanks.  Just gave the documentation a quick 
> glance.
> 

You might like to see some code examples:
https://www.rosettacode.org/wiki/Category:Jq

> jq is not installed on my platform (macOS) whereas sqlite3 is.

Right, but fortunately jq is a single binary file.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Move to Github!!?

2017-12-26 Thread Jungle Boogie
On Tue 26 Dec 2017  2:09 PM, Warren Young wrote:
> On Dec 26, 2017, at 2:47 AM, J Decker  wrote:
> > 
> > doesn't require a fee unless they want to amke it private.
> 
> You’re speaking of today’s benevolent policies.
> 

Yes, I completely agree with everything you said. Nicely said! 

While freeBSD is on github, the code is still hosted on their systems
via svn. They don't really want to break away from this, because it
would be foolish to trust any third party company with your entire code
base.

Which makes me wonder...those super large companies that host code on
github, are they also internally keeping it under src control, either
git/fossil/svn?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Move to Github!!?

2017-12-26 Thread Jungle Boogie
On Tue 26 Dec 2017  3:08 PM, Damien Sykes wrote:
> Hi,
> This is a question I have asked myself many times (I.E. Git projects moving
> to Fossil).
> GitHub is well known and boasts over 74 million repositories, yet Fossil,
> which both hosts and utilises one of the most well-known database systems in
> the world, I doubt can count a thousand. Even the ChiselApp hosting platform
> hosts a mere 360 public repositories, Hydra hosts 11, WanderingHorse hosts
> 23, outside of which lie Fossil itself, the Fossil book, SQLite and friends
> (5 publicly accessible repositories in all), and TCL and friends (7
> repositories), making a total of 408. Add SQLite private repositories, and
> private repositories that I host, have access to or otherwise generally know
> exist, and I come up with an estimate of roughly 470 repositories. Of course
> this is not an accurate statistic since it may exclude more private
> repositories, and definitely excludes any local repositories (I for one have
> about a dozen Git repositories as Fossil repositories).

I understand that github's numbers are larger, but is that figure
including unique repos and forks, because of pull requests? For instance,
we already know of at least two sqlite repos on github from this mailing
list.

Some repos are junk and so are the user accounts. I.e. accounts made by
bots for whatever reasons. Some contain very little data. Some are from
very large companies, i.e. google/facebook/netflix/microsoft.

It's kinda funny that git is a decentralized repo but github is quite
centralized. 

> While I am making every attempt to try to persuade friends towards Fossil,
> they are also choosing Git. Looks to me like the only people who seem to use
> Fossil are those who are most associated with it, which is a real shame.

Yes, that's quite a good point, but I don't know how to turn that corner
and have it more mainstream.

> The only advantage I can see with GitHub is that it's the source code
> Twitter equivalent. Everybody's repository is in one place. As long as you
> know the username and repository name you know the full repository URL, and
> you don't have to worry about server administration. 

I'm not so concerned about the server admin aspect of fossil, but I do
understand if your twitter handle matches your github repo name, it can
make things easier, but this also goes to my statement above - it's
ironic that github is very large and for distributed.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Move to Github!!?

2017-12-25 Thread Jungle Boogie
On Mon 25 Dec 2017 11:49 PM, Shekhar Reddy wrote:
> Hi,
> 
> Is there any particular reason that the source is not moved to GitHub? I
> think that would reach more number of people there.
> 

So are you saying it would be the most used in the galaxy?
SQLite is the most used database engine in the world.[0]

[0] https://sqlite.org/about.html


> Regards
> Shekhar
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling / building SQLite to include regex

2017-12-21 Thread jungle Boogie
On 21 December 2017 at 10:18, Richard Hipp  wrote:
> On 12/21/17, Paul Hoffman  wrote:
>> Greetings. I understand that SQLite doesn't come natively with regex
>> support, but that it can be added. My question is how to do so when I
>> install. I'm building from source from
>> .
>> Is there a simple recipe for "make REGEX work after installation"?
>
> There is a loadable REGEXP extension here:
> https://www.sqlite.org/src/artifact/a68d25c659bd2d89
>

And information to compile here:
https://www.sqlite.org/loadext.html

> --
> D. Richard Hipp
> d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-22 Thread jungle Boogie
On 22 November 2017 at 07:56, Igor Korot  wrote:
> Hi,
> Postgres very recently switched to PGLister for their ML
>
> This software switch tries to do exactly that - it tries to stay
> complaint with all this DMARC stuff.
>
> Here is the announcement that was posted on their wiki page:
> https://wiki.postgresql.org/wiki/PGLister_Announce.
>

Not a bad consideration. Where's the documentation on the software,
though? Is it open source/free?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-21 Thread jungle Boogie
On 21 November 2017 at 11:42, Warren Young  wrote:
> On Nov 21, 2017, at 10:24 AM, Peter Da Silva  
> wrote:
>>
>> But the mailers I use (Gmail’s web interface, Apple Mail and (yuck) Outlook) 
>> all do basic threading.
>
> I’d describe what Apple Mail and Gmail do as “clumping” rather than 
> “threading.”
>
> I think we can all agree that drh gets trees, so if he wants to make a 
> threaded web forum, he certainly needs no advice from us on how to achieve it.
>
> The effort to implement Hacker News can’t have been all that great.  It would 
> suffice for our purposes.  Do it atop Fossil and you get user authentication 
> for free, which reduces spam.  When (!) spam gets through, it can be shunned 
> using the normal Fossil mechanism, so that later clones don’t contain it.
>

An alternative to HN with similar layout:
https://lobste.rs/
https://github.com/lobsters/lobsters
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-21 Thread jungle Boogie
On 21 November 2017 at 06:30, Richard Hipp  wrote:
> On 11/21/17, Paul Sanderson  wrote:
>> Coincidence!  I have just been in my gmail folder marking a load of SQLite
>> email as 'not spam'
>
> I've been seeing mailing list emails go to spam for a while now.
> Nothing has changed with MailMan.  I think what we are seeing is the
> beginning of the end of email as a viable communication medium.
>
> I really need to come up with an alternative to the mailing list.
> Perhaps some kind of forum system.  Suggestions are welcomed.

I'm in the keep the email list, but get it setup correctly as per
Keith's recommendations.

Also, there's #sqlite on irc.freenode.net

Let's get on irc (because we all have an irc client already, right)
and chat. No need for Richard to be distracted by setting up, managing
and running forums and Discord.

> --
> D. Richard Hipp
> d...@sqlite.org

-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Good resources for TCL/TK

2017-11-19 Thread jungle boogie

Thus said Cecil Westerhof on Sat, 18 Nov 2017 14:43:23 +0100

I found the benefits for TCL/TK. But this is a SQLite mailing list, so not
the right place to ask questions if it is not connected to SQLite also.
What would be good resources for TCL/TK?



There's also a pretty active IRC room on freenode, it's #tcl.

Let us know how your experiences go with tcl.



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Best way to develop a GUI front-end

2017-11-14 Thread jungle boogie

Thus said J Decker on Tue, 14 Nov 2017 13:35:55 -0800

I'll throw my 2 cents in...

A Node.js server, and use a web frontend, or electron/nwjs which are
browsers that include node, and can be standalone apps.



Funny you should mention that. I've been looking at node.js and curious 
how sqlite would be implemented. Can you recommend a npm package for it?

Have you implemented something in node with sqlite?

This one is quite active on github and on the npmjs site:
https://github.com/sequelize/sequelize

Initially I was interested in tcl/tk, and still am, but I'm not sure 
about the tcl/tk packaging that would be necessary to make use on 
multiple computers. Also, I don't know how network database connections 
would work out, would it be the same as web based stuff or more 
complicated, etc.



Thanks,
j.b.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] openbsd: cannot compile csv.c for SO

2017-11-11 Thread jungle boogie


Hello,

I don't know know if this is an openBSD issue or something with sqlite3 
- posting here for guidance.


I'd like to make a loadable module for csv, but when attempting to 
generate the so file, I see this:


$ gcc -g -fPIC -shared csv.c -o csv.o
csv.c:42:24: error: sqlite3ext.h: No such file or directory
In file included from /usr/include/string.h:40,
 from csv.c:44:
/usr/include/machine/_types.h:60: error: expected '=', ',', ';', 'asm' 
or '__attribute__' before 'typedef'
/usr/include/machine/_types.h:70: error: expected '=', ',', ';', 'asm' 
or '__attribute__' before '__int_least8_t'

In file included from /usr/include/stdlib.h:42,
 from csv.c:45:
/usr/include/sys/types.h:75: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'int8_t'

csv.c: In function 'csv_reader_open':
csv.c:128: warning: assignment makes pointer from integer without a cast
csv.c: In function 'csv_resize_and_append':
csv.c:177: warning: assignment makes pointer from integer without a cast
csv.c: At top level:
csv.c:289: error: expected ')' before '*' token
csv.c:291: error: expected ')' before '*' token
csv.c:293: error: expected ')' before '*' token
csv.c:294: error: expected ')' before '*' token
csv.c:295: error: expected ')' before '*' token
csv.c:296: error: expected ')' before '*' token
csv.c:297: error: expected ')' before '*' token
csv.c:299: error: expected ')' before '*' token
csv.c:300: error: expected ')' before '*' token
csv.c:301: error: expected ')' before '*' token
csv.c:302: error: expected ')' before '*' token
csv.c:306: error: expected specifier-qualifier-list before 'sqlite3_vtab'
csv.c:319: error: expected specifier-qualifier-list before 
'sqlite3_vtab_cursor'

csv.c: In function 'csv_xfer_error':
csv.c:328: error: 'CsvTable' has no member named 'base'
csv.c:329: error: 'CsvTable' has no member named 'base'
csv.c: At top level:
csv.c:335: error: expected ')' before '*' token
csv.c: In function 'csv_string_parameter':
csv.c:405: warning: assignment makes pointer from integer without a cast
csv.c: At top level:
csv.c:457: error: expected ')' before '*' token
csv.c: In function 'csvtabCursorRowReset':
csv.c:597: error: 'CsvCursor' has no member named 'base'
csv.c:599: error: 'CsvTable' has no member named 'nCol'
csv.c:600: error: 'CsvCursor' has no member named 'azVal'
csv.c:601: error: 'CsvCursor' has no member named 'azVal'
csv.c:602: error: 'CsvCursor' has no member named 'aLen'
csv.c: At top level:
csv.c:611: error: expected ')' before '*' token
csv.c:623: error: expected ')' before '*' token
csv.c:634: error: expected ')' before '*' token
csv.c:657: error: expected ')' before '*' token
csv.c:702: error: expected ')' before '*' token
csv.c:717: error: expected ')' before '*' token
csv.c:727: error: expected ')' before '*' token
csv.c:737: error: expected ')' before '*' token
csv.c:764: error: expected ')' before '*' token
csv.c:802: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'CsvModule'

csv.c:870: error: expected ')' before '*' token

Some of this points to files on the OS, others in csv.
regexp compiled without any issues.

Thanks,
jb

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Introduction to SQLite

2017-11-01 Thread jungle Boogie
Hi Simon,

Thanks for sharing!
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] BedrockDB interview on Floss Weekly

2017-10-25 Thread jungle Boogie
Hi All,

Pardon the usual interruption of complex sqlite questions...

David Barrett was interviewed on Floss Weekly today and gave a rave
review of his project, which is based on the wonderful sqlite3
database.

I'm only 10 minutes into the interview and really love it already!
https://twit.tv/shows/floss-weekly/episodes/456

Thanks to David for appearing on the show and of course to the Sqlite3
team for their amazing efforts to make, and maintain the most widely
deployed database engine in the world - maybe even in the galaxy.

Thanks,
j.b.

-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is there a way to perform a muti-level sort and extract of large data sets?

2017-09-26 Thread jungle Boogie
Hi there,

Just because I'm interested, I'm wondering if you can identify your
hardware, and how long it takes your system to do your desired operation on
such a large number of records.

Do let us know which option you performed the query with as well.

P.S. For best results, I'd recommend using the latest release of SQLite.

Thanks!
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Mailinglist question

2017-08-09 Thread jungle Boogie
On 9 August 2017 at 15:02, Nico Williams  wrote:
> On Wed, Aug 09, 2017 at 03:48:34PM -0600, Keith Medcalf wrote:
>> There is a solution since about 1984 ... it is called NNTP (Usenet
>> News).  Google Groups is basically Usenet News with a (so some people
>> thing -- but not I -- I detest so-called web-forums) purty front end
>> to the news reader.  Gateways between mailman, bitnet, usenet, and a
>> bunch of other stuff existed for a long time (and still do, mostly).
>
> I... would like to use NNTP, but I'd need someone to provide the
> service.  Though I'd be annoyed at having to use two different UAs (I
> use mutt primarily; it doesn't support NNTP).
>

Here's a usenet provider:
https://www.eternal-september.org
https://en.wikipedia.org/wiki/Eternal_September

I think mutt can be patched to support nntp.
I've used slrn and it's pretty straight forward to use, but I
understand the switch clients issue.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Version 3.20.0 coming soon...

2017-07-13 Thread jungle Boogie
On 13 July 2017 at 11:49, Richard Hipp  wrote:
> The 3.20.0 release of SQLite is expected in about a week.  Please
> report any issues that you have with the beta as soon as possible.
>
> Code is available in the "prerelease snapshot" at
> https://sqlite.org/download.html
>
> An overview of changes is at https://sqlite.org/draft/releaselog/3_20_0.html
>

https://sqlite.org/draft/c3ref/result_blob.html
Duplicate from:
space obtained from from sqlite3_malloc() before it

It's mighty impressive that you and your team make rather large
releases like this and you do it so frequently.
Tip of the hat to you!



> You can send issues to this email list, or directly to me.
>
> --
> D. Richard Hipp
> d...@sqlite.org


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Version 3.20.0 coming soon...

2017-07-13 Thread jungle Boogie
On 13 July 2017 at 11:49, Richard Hipp  wrote:
> The 3.20.0 release of SQLite is expected in about a week.  Please
> report any issues that you have with the beta as soon as possible.
>
> Code is available in the "prerelease snapshot" at
> https://sqlite.org/download.html
>
> An overview of changes is at https://sqlite.org/draft/releaselog/3_20_0.html
>
> You can send issues to this email list, or directly to me.
>

On doesn't have to be capitalized:
SQLite Release 3.20.0 On 2017-07-20


Period missing on these items:
Added the STMT
Provide the SQLITE_PREPARE_PERSISTENT






> --
> D. Richard Hipp
> d...@sqlite.org


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [patch] for test/backup2.test

2017-07-10 Thread jungle boogie

Hi All,
On 07/06/2017 10:51 PM, Pavel Volkov wrote:

Hello.
Please, make test 'test/backup2.test' more compatible with FreeBSD.
This is patch for it:

--- test/backup2.test.orig  2017-07-07 04:59:34 UTC
+++ test/backup2.test
@@ -143,7 +143,7 @@ do_test backup2-9 {
  #
  if {$tcl_platform(platform)=="windows"} {
set msg {cannot open source database: unable to open database file}
-} elseif {$tcl_platform(os)=="OpenBSD"} {
+} elseif {$tcl_platform(os)=="OpenBSD"||$tcl_platform(os)=="FreeBSD"} {
set msg {restore failed: file is encrypted or is not a database}
  } else {
set msg {cannot open source database: disk I/O error}



Any chance of this patch getting accepted/reviewed?

Without it, this happens:
Time: backcompat.test 13 ms 




! backup2-10 expected: [1 {cannot open source database: disk I/O error}] 




! backup2-10 got:  [1 {restore failed: file is not a database}]




Thank you.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation improvement recommendations

2017-07-10 Thread jungle Boogie
Here's a couple more.

On this page: https://www.sqlite.org/src/doc/trunk/README.md

describes the LALR(1) grammer
should be:
describes the LALR(1) grammar

Each has a suscinct
should be:
Each has a succinct

-

On this page: https://www.sqlite.org/dbstat.html

The the DBSTAT virtual
should be:
The DBSTAT virtual
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Documentation improvement recommendations

2017-07-10 Thread jungle Boogie
Hi All,

Here's a list of some documentation improvements.

-

On this page: https://www.sqlite.org/rbu.html

an RBU Vaccum is
should be:
an RBU Vacuum is

What about this change.
Preparing An RBU Update File
To:
Preparing an RBU Update File


Too many words:
it may be be more
should be:
it may be more

-

On this page: https://www.sqlite.org/sqldiff.html

but do not show the actual chagnes
should be:
but do not show the actual changes

(sometimes refered to as "shadow" tables)
should be:
(sometimes referred to as "shadow" tables)

-

On this page: https://www.sqlite.org/copyright.html

Obtaining An License To Use SQLite
should be:
Obtaining A License To Use SQLite

I recommend:
Obtaining a License to Use SQLite

-

On this page: https://www.sqlite.org/faq.html
How do I create an AUTOINCREMENT field.
should be
How do I create an AUTOINCREMENT field?

-

On this page: https://www.sqlite.org/privatebranch.html
You can the create
should be:
You can then create

-
On this page: https://sqlite.org/android/doc/trunk/www/index.wiki

various ways the the SQLite
should be:
various ways the SQLite


Thanks!


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] appfileformat.html

2017-07-09 Thread jungle Boogie
Hi SQLITE Committers,

I noticed a misspelling here:
https://www.sqlite.org/appfileformat.html

catagory is misspelled; it should be: category.

First committed here:
https://www.sqlite.org/docsrc/info/6d257b8d928cfd00

Thanks!


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Bug Report: https://www.sqlite.org/chronology.html out of date

2017-06-21 Thread jungle Boogie
On 20 June 2017 at 07:55, Tom Ritter  wrote:
> In lieu of an official support RSS feed,
> https://www.sqlite.org/chronology.html is used to detect new versions
> of SQLite and how out of date the current one embedded in a product
> is. It worked for the past several months, but now this page is out of
> date. =)

You can monitor this:
https://www.sqlite.org/src/timeline?r=release

I think if you put that in your rss reader, it'll update when a new
build is available.

>
> -tom
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite.org port 80 - can't connect

2017-06-12 Thread jungle Boogie
On 12 June 2017 at 01:03, Richard Hipp <d...@sqlite.org> wrote:
> On 6/12/17, jungle boogie <jungleboog...@gmail.com> wrote:
>> Hi All,
>>
>> curl: (7) Failed to connect to www.sqlite.org port 80: Connection refused
>
> xinetd keeps crashing.  Dunno why.  I've restarted it.

I think it died again.

>
> Port 443 was still up.  Also ports 80 and 443 on www2.sqlite.org and
> www3.sqlite.org.

Yeah, I think I'll have fossil switch over to https.

> --
> D. Richard Hipp
> d...@sqlite.org



-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite.org port 80 - can't connect

2017-06-12 Thread jungle boogie

Hi All,

curl: (7) Failed to connect to www.sqlite.org port 80: Connection refused

https is working fine:
curl --head https://www.sqlite.org
HTTP/1.1 200 OK
Connection: keep-alive
Date: Mon, 12 Jun 2017 07:37:35 +
Last-Modified: Fri, 09 Jun 2017 14:05:33 +
Content-type: text/html; charset=utf-8
Content-length: 6977




Thanks,
jb
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite as a Shell Script

2016-11-15 Thread jungle Boogie
Hi All,

Pretty interesting article:
https://www.invincealabs.com/blog/2016/11/sqlite-shell-script/

This post documents how we were able to create a SQLite database that
can be executed as an ash shell script purely from SQL queries.


Found here:
https://www.reddit.com/r/netsec/comments/5cwb07/sqlite_as_a_shell_script/



-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unable to connect

2016-11-13 Thread jungle boogie

On 11/13/2016 10:29 PM, Cecil Westerhof wrote:

When going to www.sqlite.org I get:
Unable to connect



Also happening for me.

Use https://www.sqlite.org/ until non-https is restored.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sites inaccessible

2016-10-28 Thread jungle Boogie
Hi Dr. Hipp,

Probably a low concern for you at 1:30am your time but I can't connect
to fossil-scm.org or sqlite.org over port 80.

$ curl http://sqlite.org/
curl: (7) Failed to connect to sqlite.org port 80: Connection refused

$ curl http://fossil-scm.org
curl: (7) Failed to connect to fossil-scm.org port 80: Connection refused


https does work:
$ curl https://www.fossil-scm.org

Redirect to Location:
https://www.fossil-scm.org/index.html/doc/trunk/www/index.wiki




$ curl https://www.sqlite.org
http://www.w3.org/TR/html4/strict.dtd;>




SQLite Home Page





-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] freebsd 11 SQLite build: readline/readline.h file not found

2016-10-18 Thread jungle Boogie
On 18 October 2016 at 15:09, Warren Young <w...@etr-usa.com> wrote:
> On Oct 18, 2016, at 3:59 PM, jungle Boogie <jungleboog...@gmail.com> wrote:
>>
>> On 18 October 2016 at 13:55, Warren Young <w...@etr-usa.com> wrote:
>>> Did you ./configure after the upgrade?  If not, do so.
>>
>> yes, this is my standard config:
>> ./configure --disable-editline; make
>
> If you don’t want any command line editing in sqlite3, add --disable-readline 
> then, too.  That should solve it.


Got it building with:
./configure --disable-editline --with-readline-inc=/usr/local/include

Thanks all and sorry for the noise.

best,
sean


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] freebsd 11 SQLite build: readline/readline.h file not found

2016-10-18 Thread jungle Boogie
On 18 October 2016 at 13:55, Warren Young  wrote:
> Did you ./configure after the upgrade?  If not, do so.

yes, this is my standard config:
./configure --disable-editline; make

sqliteup is an alias in my shell to do this and then sudo make install


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] freebsd 11 SQLite build: readline/readline.h file not found

2016-10-16 Thread jungle Boogie
On 15 October 2016 at 23:45, jungle Boogie <jungleboog...@gmail.com> wrote:
> Readline.h is found here:
> # find / -name readline.h
> /usr/local/include/editline/readline.h
> /usr/local/include/readline/readline.h
> /usr/local/include/guile/2.0/readline.h
> /usr/include/edit/readline/readline.h

FWIW, I downloaded the src for 10.3 (the next newest release of
freebsd) and readline.h is found here:
./lib/libedit/edit/readline/readline.h
./contrib/libreadline/readline.h

src files:
ftp.freebsd.org/pub/FreeBSD/releases/i386/10.3-RELEASE/



-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] freebsd 11 SQLite build: readline/readline.h file not found

2016-10-16 Thread jungle Boogie
Hi All,

I just re-installed freebsd 11 on a machine of mine and as usual, I
build sqlite from source. However, I see this:
sqlite3/src/shell.c:66:11: fatal error: 'readline/readline.h' file not found

I'm quite sure I didn't have problems on the 10.x branch with sqlite,
so I don't know if things in 11.0 were re-arranged.

Readline.h is found here:
# find / -name readline.h
/usr/local/include/editline/readline.h
/usr/local/include/readline/readline.h
/usr/local/include/guile/2.0/readline.h
/usr/include/edit/readline/readline.h

The header in shell.c was added 16+ years ago, so this doesn't seem to
be a new change in sqlite3:
https://www.sqlite.org/src/info/97a0fb780ea1992c


Thanks,
Sean

-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite separator command on one insert column

2016-09-26 Thread jungle Boogie
On 26 September 2016 at 13:17, R Smith  wrote:
> sqlite3.exe dropped.db "INSERT INTO DropDB_log(date, ip_address, status)
> VALUES (%DATE%, %%A, '%STATUS%');"


YES!

During my lunch break, I don't know why it didn't click to make this a
loop until I got back and saw your helpful reply. :)

IP address needed to be escaped, though:
sqlite3.exe dropped.db "INSERT INTO DropDB_log(date, ip_address,
status) VALUES (%DATE%, '%%A', '%STATUS%');"



-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite separator command on one insert column

2016-09-26 Thread jungle Boogie
Hi All,


I'm attempting to make a windows batch file that reads a text file and
inserts a new record for each entry:

sqlite3.exe dropped.db  "INSERT INTO
`DropDB_log`(`date`,`ip_address`,`status`) VALUES
(%DATE%,readfile('machinelist.txt'),'%STATUS%');"

Right now, it does this:
date,ip_address,status20160926,128.10.10.1
128.10.10.3
128.10.10.4
128.10.10.5,up


I'd like this:
20160926,128.10.10.1,up
20160926,128.10.10.3,up
20160926,128.10.10.4,down
20160926,128.10.10.5,up

Will the readfile + the separator command allow this kind of hackery
in windows batch files?

Thanks!


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How restrict access to SQLite database?

2016-08-09 Thread jungle Boogie
On 9 August 2016 at 12:11, Jaime Stuardo  wrote:
> Please, give more details. I have found I can encrypt the database, but how? 
> I am using SQLite manager of Firefox extension.


There's a paid sqlite extension called SEE:
https://www.sqlite.org/see/doc/trunk/www/index.wiki
http://www.hwaci.com/sw/sqlite/see.html
http://www.hwaci.com/cgi-bin/see-step1

Should be enough, right?

-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Education Opportunity Alert: The SQL Primer

2016-08-04 Thread jungle Boogie
On 4 August 2016 at 08:14, R.A. Nagy  wrote:
> Comments & suggestion for improvement be both respected, as well as
> appreciated here, as usual!

WOW! Such great energy and enthusiasm in the primer video!
I'm looking forward to the rest.

Best,
sean


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL / SQLite for Beginners

2016-05-26 Thread jungle Boogie
On 26 May 2016 at 05:49, R.A. Nagy  wrote:
> Would this be the preferred pronunciation?
>
>  https://youtu.be/hB54p_Xh37M
>

That goes a bit too fast but it sounds right to my ears.

Listen to this interview:
https://changelog.com/201/

If you tune in around 17:20 seconds, they'll talk about the name and
it's pronunciation.

keep up the great work with the tutorials and I'll agree with the
others--narrate the videos as you did very well the first time.


>
> Thanks in advance,
>
> -Rn




-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] determining is-leap-year in sqlite

2016-05-09 Thread jungle Boogie
On 8 May 2016 at 23:13, Stephan Beal  wrote:
> On Mon, May 9, 2016 at 5:40 AM, Stephan Beal  wrote:
>
>> That suggests that the script is not consistently telling sqlite which TZ
>> to use in all calculations. i will take a look at it as time
>>
>
> just fyi: i can now reproduce the problem on my x64, where my days are
> shifted 1 to the left. Not sure what's causing it, but probably won't be
> able to look at it until next weekend :/. i apparently broke it at some
> point without noticing.


Not a problem. Thanks for checking into this and I'm happy to know
this is not sqlite problem!


-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] determining is-leap-year in sqlite

2016-05-08 Thread jungle Boogie
On 8 May 2016 at 12:28, jungle Boogie  wrote:
> I'll set the TZ on the pi to match and see what happens.

We're on to something!

pi time:
$ date
Sun May  8 12:29:54 PDT 2016

x86 time:
% date
Sun May  8 12:30:04 PDT 2016


They match with cal.sql now!
http://kopy.io/GbbDR


So no problem with your script unless you're not using UTC time!

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] determining is-leap-year in sqlite

2016-05-08 Thread jungle Boogie
On 8 May 2016 at 02:04, Stephan Beal  wrote:
> On Sun, May 8, 2016 at 10:53 AM, Stephan Beal  
> wrote:
>
>> The system clock is correct on your x64 machine, i assume? (Even if it's
>> wrong, that doesn't explain the days being shifted left by 1.)
>>
>
> One idea comes to mind: perhaps it doesn't consistently deal with timezones
> everywhere, and you've got vastly different timezones set up on those
> machines?

Well the pi is UTC and the x86 is Pacific TZ but that's only a
difference of 7 hours.


pi:
$ date
Sun May  8 19:27:43 UTC 2016

x86:
% date
Sun May  8 12:27:56 PDT 2016


I'll set the TZ on the pi to match and see what happens.

>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
> "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
> those who insist on a perfect world, freedom will have to do." -- Bigby Wolf



-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] determining is-leap-year in sqlite

2016-05-07 Thread jungle Boogie
Hi Stephan,
On 18 February 2016 at 13:55, Stephan Beal  wrote:
> On Thu, Feb 18, 2016 at 10:42 PM, Stephan Beal 
> wrote:
>
>> Here we go:
>>
>> http://fossil.wanderinghorse.net/download/cal.sql
>>
>
> sorry, one more: it was just updated with minor doc improvements and better
> syntax conformance (i had used a lot of double-quotes simply out of recent
> scripting habit).
>
>

I periodically run your cal sql query to get a quick calendar view of
the months and because it's really neat what you did with sql.

Running sqlite3 trunk on a raspberry pi, I get this:
++
   May 2016
 Mo  Tu  We  Th  Fr  Sa  Su
  1
  2   3   4   5   6   7 ( 8)
  9  10  11  12  13  14  15
 16  17  18  19  20  21  22
 23  24  25  26  27  28  29
 30  31
++


(8) is on Saturday, that's correct for 2016.



Running sqlite3 trunk on x86 64bit ubuntu system, I get this:
++
   May 2016
 Mo  Tu  We  Th  Fr  Sa  Su
  1   2
  3   4   5   6 ( 7)  8   9
 10  11  12  13  14  15  16
 17  18  19  20  21  22  23
 24  25  26  27  28  29  30
 31
++


(7) is on Friday and in fact, all the days are shifted once.

Both of those are a bit difficult to follow here so this link has both:
http://kopy.io/NLViy

What would cause the same exact cal.sql file obtained from your link
be displayed differently on different architectures but the same
sqlite3 version?

Both sqlite3 versions were installed from trunk and configured with
plain ./configure





> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
> "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
> those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] Is it possible that dropping a big table takes very long

2016-04-20 Thread jungle Boogie
On 20 April 2016 at 14:55, Cecil Westerhof  wrote:
> This one I download, unpacked and tried. It worked. So it should be
> correct now:
> https://drive.google.com/file/d/0BzW5q7uL-6z0UjFhRWZWSENnZW8/


Windows 8.1 4 gigs of RAM, dell latitude with i5 process from a few
years ago, lots of tabs and apps open, here's some results.

SQLite version 3.12.1 2016-04-08 15:09:49

sqlite> drop table testuniqueuuid;
Run Time: real 9.763 user 1.015625 sys 2.031250

sqlite> delete from testuniqueuuid;
Run Time: real 19.149 user 1.156250 sys 2.109375

I didn't bother with secure deletes in my case.

This whole thread sounds like a good use case for flame graphs:
http://brendangregg.com/flamegraphs


-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] hexadecimal conversion on select query

2016-03-13 Thread jungle Boogie
Hi Keith,
On 13 March 2016 at 13:31, Keith Medcalf  wrote:
> On Sunday, 13 March, 2016 13:36 -07:00, jungle Boogie  gmail.com> wrote:
>> Here it is in decimal: (select code from sidemeters)
>> "0"
>> "1"
>> "2"
>> "5"
>> "6"
>> "7"
>> "28"
>> "29"
>> "30"
>> "31"
>
> Assuming that your quotes mean that the value is TEXT, not a number.
> You can check this by running:
>
>  select code, typeof(code) from sidemeters;

It's an integer. The quotes come from copying a sample from sqlite
manager. Sorry to have omitted that from my previous message.

>
> You will note that the printf function wants to cast the "code" to an 
> integer, then outputs the hex representation of the integer.
> The hex() function treats the item as a "blob" and converts the actual bytes 
> stored into hex.
>
> They are two entirely different things.
>
> So really the question is, what is the declared column affinity of the "code" 
> column in you table definition and what is the actual type of the data stored?
>
> Based on the results you have obtained, I would suspect that the column 
> affinity is "integer" and you are storing either text or integer (it is 
> immaterial which in this particular case).
>
> In order for hex() to generate output, it "converts" the integer into a blob 
> (text) and outputs the hexified result.
>
>

So does that mean it can't convert it from the decimal integer to a
hexadecimal result, like I'm doing with printf?

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] hexadecimal conversion on select query

2016-03-13 Thread jungle Boogie
On 12 March 2016 at 22:07, J Decker  wrote:
> maybe ?
> https://www.sqlite.org/lang_corefunc.html
>
> hex(X)The hex() function interprets its argument as a BLOB and returns
> a string which is the upper-case hexadecimal rendering of the content
> of that blob.

That's what I first tried but not working as I expected.

Here it is in decimal: (select code from sidemeters)
"0"
"1"
"2"
"5"
"6"
"7"
"28"
"29"
"30"
"31"

And in hex with my attempt of printf: (SELECT printf("%x",code)  FROM
sidemeters)
"0"
"1"
"2"
"5"
"6"
"7"
"1c"
"1d"
"1e"
"1f"

Here is with hex(code): (SELECT hex(code) FROM sidemeters)
"30"
"31"
"32"
"35"
"36"
"37"
"3238"
"3239"
"3330"
"3331"


Am I trying to use hex() incorrectly?

Thanks!

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] hexadecimal conversion on select query

2016-03-12 Thread jungle Boogie
Hello All,

I'm curious to know if there's a better way to run a query and convert
the results to hexadecimal.

 This is what I have so far:
SELECT printf("%x %d",code,code), printf("%x", denom)  FROM sidemeters
order by denom

The data is already in decimal so I don't necessarily need to include
the extra %d, but it's nice for comparison.


Thanks for any input!

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] Build fail: undefined reference to `pthread_create'

2016-01-28 Thread jungle Boogie
Hi Robert,
On 27 January 2016 at 14:20, Robert Weiss  wrote:
> A few builds ago I got a similar message.  I don't recall whether I actively 
> tried to use threads or got blindsided by change.  The short story is that 
> linking in libpthread caused the build to succeed.  The longer story is that 
> threads were unreliable in my environment (Windows/cygwin), caused errors, 
> and I dropped them from later builds.

Hanno and I chatted yesterday and he provided a patch for me to test
that worked.
It was implemented in the commit below and now works as expected!
https://www.sqlite.org/src/info/47633ffdbfead3ce

Thanks to Hanno, DRH and you for your input.

> Bob Weiss
>

Thanks,
sean


[sqlite] Build fail: undefined reference to `pthread_create'

2016-01-27 Thread jungle Boogie
On 21 January 2016 at 11:16, Richard Hipp  wrote:
> The change that is causing your problem was put in at the suggestion
> of Hanno B?ck on the sqlite-dev mailing list.  Hanno said he was going
> to try to contact you off-list in order to figure out how to reproduce
> the issue you are seeing and to devise a work-around.  The change
> facilitates compiling SQLite with ASAN.


I think this is who you're referring to: https://hboeck.de/
I have contacted him off-list to see if he has any suggestions.

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] Build fail: undefined reference to `pthread_create'

2016-01-22 Thread jungle Boogie
On 21 January 2016 at 11:16, Richard Hipp  wrote:
> The change that is causing your problem was put in at the suggestion
> of Hanno B?ck on the sqlite-dev mailing list.  Hanno said he was going
> to try to contact you off-list in order to figure out how to reproduce
> the issue you are seeing and to devise a work-around.  The change
> facilitates compiling SQLite with ASAN.


I have not yet received any off-list message about the build failure.

It's pretty easy to reproduce: use freebsd and this config line:
./configure --disable-editline; make

Fails every time.

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] Build fail: undefined reference to `pthread_create'

2016-01-21 Thread jungle Boogie
Sent from my iPhone 7.1
On Jan 20, 2016 11:25 AM, "jungle Boogie"  wrote:
>
> Hello All,
>
> My last successful build was SQLite version 3.11.0 2016-01-12 14:10:05
>
> I build with: ./configure --disable-editline; make
>
>
> ./.libs/libsqlite3.a(sqlite3.o): In function `sqlite3ThreadCreate':
> /usr/home/sean/fossil-repos/sqlite3/sqlite3.c:24385: undefined
> reference to `pthread_create'
> /usr/home/sean/fossil-repos/sqlite3/sqlite3.c:24385: undefined
> reference to `pthread_create'
> /usr/home/sean/fossil-repos/sqlite3/sqlite3.c:24385: undefined
> reference to `pthread_create'
> cc: error: linker command failed with exit code 1 (use -v to see
invocation)
> *** Error code 1
>
> Stop.

Does no one else experience this failure to build? Will I need to add
another config option to get around this failure?

>
>
> Probably centered around this commit:
> https://sqlite.org/src/info/9c3a0dc2e8bf202c
>
>
>
>
> --
>


[sqlite] Build fail: undefined reference to `pthread_create'

2016-01-20 Thread jungle Boogie
Hello All,

My last successful build was SQLite version 3.11.0 2016-01-12 14:10:05

I build with: ./configure --disable-editline; make


./.libs/libsqlite3.a(sqlite3.o): In function `sqlite3ThreadCreate':
/usr/home/sean/fossil-repos/sqlite3/sqlite3.c:24385: undefined
reference to `pthread_create'
/usr/home/sean/fossil-repos/sqlite3/sqlite3.c:24385: undefined
reference to `pthread_create'
/usr/home/sean/fossil-repos/sqlite3/sqlite3.c:24385: undefined
reference to `pthread_create'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.


Probably centered around this commit:
https://sqlite.org/src/info/9c3a0dc2e8bf202c




-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] build failure: undeclared identifier 'uintptr_h'

2015-12-10 Thread jungle Boogie
On 10 December 2015 at 10:00, Richard Hipp  wrote:
> On 12/10/15, jungle Boogie  wrote:
>>
>> Updating to trunk this morning results in this failure when attempting to
>> build:
>>
>
> Should be fixed now.  Please try again.


Well done! Thanks.

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] build failure: undeclared identifier 'uintptr_h'

2015-12-10 Thread jungle Boogie
Hello,

Updating to trunk this morning results in this failure when attempting to build:

% ./configure --disable-editline

G_H -DBUILD_sqlite -DNDEBUG -I/usr/local/include/tcl8.6
-DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=1 -c sqlite3.c -o sqlite3.o
sqlite3.c:21951:9: error: use of undeclared identifier 'uintptr_h';
did you mean 'uintptr_t'?
if( SQLITE_WITHIN(p, sqlite3GlobalConfig.pScratch, mem0.pScratchEnd) ){
^
sqlite3.c:9032:23: note: expanded from macro 'SQLITE_WITHIN'
((uintptr_t)(P)>=(uintptr_h)(S) && (uintptr_t)(P)<(uintptr_t)(E))
  ^
/usr/include/sys/_stdint.h:78:22: note: 'uintptr_t' declared here
typedef __uintptr_t uintptr_t;
^
sqlite3.c:21987:10: error: use of undeclared identifier 'uintptr_h';
did you mean 'uintptr_t'?
  return SQLITE_WITHIN(p, db->lookaside.pStart, db->lookaside.pEnd);
 ^
sqlite3.c:9032:23: note: expanded from macro 'SQLITE_WITHIN'
((uintptr_t)(P)>=(uintptr_h)(S) && (uintptr_t)(P)<(uintptr_t)(E))
  ^
/usr/include/sys/_stdint.h:78:22: note: 'uintptr_t' declared here
typedef __uintptr_t uintptr_t;
^
sqlite3.c:62342:12: error: use of undeclared identifier 'uintptr_h';
did you mean 'uintptr_t'?
   || !SQLITE_WITHIN(pCell,aOld,[usableSize])
   ^
sqlite3.c:9032:23: note: expanded from macro 'SQLITE_WITHIN'
((uintptr_t)(P)>=(uintptr_h)(S) && (uintptr_t)(P)<(uintptr_t)(E))
  ^
/usr/include/sys/_stdint.h:78:22: note: 'uintptr_t' declared here
typedef __uintptr_t uintptr_t;
^
3 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/home/sean/fossil-repos/sqlite3


Current installed version: SQLite version 3.10.0 2015-12-03 13:43:07

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] SQLDIFF problem

2015-12-01 Thread jungle Boogie
On 30 November 2015 at 06:27, Richard Hipp  wrote:
>> Just curious. Why does SQLite allow those? Legacy (i.e.
>> backward-compatibility)? Valid in ANSI SQL? --DD
>
> I don't know if it is valid ANSI SQL or not.  But SQLite has always
> allowed it, so we have to support it now for legacy.


How does one invoke the sqldiff tool? I see the c file in
tool/sqldiff.c. I don't see a download for any OS at
https://www.sqlite.org/download.html

Thanks!

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] editline/readline.h' file not found

2015-11-10 Thread jungle Boogie
On 10 November 2015 at 04:52, Richard Hipp  wrote:
> On 11/10/15, jungle Boogie  wrote:
>> On 9 November 2015 at 19:29, Richard Hipp  wrote:
>>> Works for me on OpenBSD 5.8.  No issues at all.
>>
>>
>> Failing on freebsd with this make file:
>> https://www.sqlite.org/src/artifact/4469ed8b02a9934f
>>
>> Introduced with this check-in:
>> https://www.sqlite.org/src/info/866f0277781dedf0
>>
>> Commenting out line 57 and will get sqlite3 to build and install.
>>
>
> What happens if you use:
>
> ./configure --disable-editline

That builds it successfully!

Thanks

>
> --
> D. Richard Hipp
> drh at sqlite.org

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] editline/readline.h' file not found

2015-11-09 Thread jungle Boogie
On 9 November 2015 at 19:29, Richard Hipp  wrote:
> Works for me on OpenBSD 5.8.  No issues at all.


Failing on freebsd with this make file:
https://www.sqlite.org/src/artifact/4469ed8b02a9934f

Introduced with this check-in:
https://www.sqlite.org/src/info/866f0277781dedf0

Commenting out line 57 and will get sqlite3 to build and install.

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] editline/readline.h' file not found

2015-11-09 Thread jungle Boogie
On 8 November 2015 at 19:51, jungle Boogie  wrote:
> sqlite3 /home/jungle/fossil-repos/sqlite3/src/shell.c
> ./.libs/libsqlite3.a -ledit -lpthread -Wl,-rpath -Wl,/usr/local/lib
> /home/jungle/fossil-repos/sqlite3/src/shell.c:71:11: fatal error:
> 'editline/readline.h' file not found
> # include 
>   ^
> 1 error generated.
> *** Error code 1
>
> Stop.
> make: stopped in /usr/home/jungle/fossil-repos/sqlite3


Can anyone confirm this is a problem on non-gnu/linux systems? AKA,
does it work on your *BSD system?



-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] editline/readline.h' file not found

2015-11-08 Thread jungle Boogie
Hello All,

Is anyone else getting this strange fatal error when building sqlite
from source:

touch .target_source
tclsh8.6 /home/jungle/fossil-repos/sqlite3/tool/mksqlite3c.tcl
cp tsrc/shell.c tsrc/sqlite3ext.h .
./libtool --mode=compile --tag=CC cc -g -O2 -DSQLITE_OS_UNIX=1 -I.
-I/home/jungle/fossil-repos/sqlite3/src
-I/home/jungle/fossil-repos/sqlite3/ext/rtree
-I/home/jungle/fossil-repos/sqlite3/ext/fts3 -D_HAVE_SQLITE_CONFIG_H
-DBUILD_sqlite -DNDEBUG -I/usr/local/include/tcl8.6
-DSQLITE_THREADSAFE=1-DSQLITE_TEMP_STORE=1 -c sqlite3.c
libtool: compile:  cc -g -O2 -DSQLITE_OS_UNIX=1 -I.
-I/home/jungle/fossil-repos/sqlite3/src
-I/home/jungle/fossil-repos/sqlite3/ext/rtree
-I/home/jungle/fossil-repos/sqlite3/ext/fts3 -D_HAVE_SQLITE_CONFIG_H
-DBUILD_sqlite -DNDEBUG -I/usr/local/include/tcl8.6
-DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=1 -c sqlite3.c -o sqlite3.o
./libtool --mode=link cc -g -O2 -DSQLITE_OS_UNIX=1 -I.
-I/home/jungle/fossil-repos/sqlite3/src
-I/home/jungle/fossil-repos/sqlite3/ext/rtree
-I/home/jungle/fossil-repos/sqlite3/ext/fts3 -D_HAVE_SQLITE_CONFIG_H
-DBUILD_sqlite -DNDEBUG -I/usr/local/include/tcl8.6
-DSQLITE_THREADSAFE=1  -no-undefined -o libsqlite3.la sqlite3.lo
-lpthread -rpath "/usr/local/lib" -version-info "8:6:8"
libtool: link: ar cru .libs/libsqlite3.a  sqlite3.o
libtool: link: ranlib .libs/libsqlite3.a
libtool: link: ( cd ".libs" && rm -f "libsqlite3.la" && ln -s
"../libsqlite3.la" "libsqlite3.la" )
./libtool --mode=link cc -g -O2 -DSQLITE_OS_UNIX=1 -I.
-I/home/jungle/fossil-repos/sqlite3/src
-I/home/jungle/fossil-repos/sqlite3/ext/rtree
-I/home/jungle/fossil-repos/sqlite3/ext/fts3 -D_HAVE_SQLITE_CONFIG_H
-DBUILD_sqlite -DNDEBUG -I/usr/local/include/tcl8.6
-DSQLITE_THREADSAFE=1  -DHAVE_READLINE=0 -DHAVE_EDITLINE=1
-DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -o
sqlite3  /home/jungle/fossil-repos/sqlite3/src/shell.c libsqlite3.la
-ledit -lpthread   -rpath "/usr/local/lib"
libtool: link: cc -g -O2 -DSQLITE_OS_UNIX=1 -I.
-I/home/jungle/fossil-repos/sqlite3/src
-I/home/jungle/fossil-repos/sqlite3/ext/rtree
-I/home/jungle/fossil-repos/sqlite3/ext/fts3 -D_HAVE_SQLITE_CONFIG_H
-DBUILD_sqlite -DNDEBUG -I/usr/local/include/tcl8.6
-DSQLITE_THREADSAFE=1 -DHAVE_READLINE=0 -DHAVE_EDITLINE=1
-DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -o
sqlite3 /home/jungle/fossil-repos/sqlite3/src/shell.c
./.libs/libsqlite3.a -ledit -lpthread -Wl,-rpath -Wl,/usr/local/lib
/home/jungle/fossil-repos/sqlite3/src/shell.c:71:11: fatal error:
'editline/readline.h' file not found
# include 
  ^
1 error generated.
*** Error code 1

Stop.
make: stopped in /usr/home/jungle/fossil-repos/sqlite3


-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] libtclsqlite3 assistance

2015-08-21 Thread jungle Boogie
Hi Dr. H,
On 21 August 2015 at 14:23, Richard Hipp  wrote:
> On 8/21/15, jungle Boogie  wrote:
>>
>> Is it possible to compile in libtclsqlite3?
>>
>
> Dunno.  But you can compile the libtclsqlite3.so yourself:
>
> make tclsqlite3.c
> gcc -fPIC -shared -I. -o libtclsqlite3.so tclsqlite3.c


Made it fine but compiling not so much:

/usr/local/bin/gcc48 -fPIC -shared -I. -o libtclsqlite3.so tclsqlite3.c
tclsqlite3.c:162240:17: fatal error: tcl.h: No such file or directory
 #include "tcl.h"
 ^
compilation terminated.

I have tcl.h here:
/usr/local/include/tcl8.6/generic/tcl.h
/usr/local/include/tcl8.6/tcl.h


>
> --
> D. Richard Hipp
> drh at sqlite.org
\
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] libtclsqlite3 assistance

2015-08-21 Thread jungle Boogie
Hello All,

I'm trying to install this on my freebsd system:
https://github.com/dbohdan/sqawk

Problem is that I compile sqlite from source and keep up to date with
trunk pretty regularly, but sqawk can't compile when I also have
sqlite complied.

Main error from sqawk:
errorInfo: couldn't load file
"/usr/local/lib/tcl8.6/sqlite3/libtclsqlite3.so": Cannot open
"/usr/local/lib/tcl8.6/sqlite3/libtclsqlite3.so"


I have tried ./configure --enable-shared and ./configure
--enable-shared=libtclsqlite3.so in sqlite src but config log always
says no.

configure:9790: checking whether to build shared libraries
configure:9811: result: no


Full config log: http://dpaste.com/1MEDECZ.txt

Is it possible to compile in libtclsqlite3?

If you don't have a freebsd system nearby, you can use Vagrant to spin
a VM up very quickly:
https://atlas.hashicorp.com/freebsd/boxes/FreeBSD-10.2-RELEASE



-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] CSV excel import

2015-07-30 Thread jungle Boogie
On 30 July 2015 at 13:52, Simon Slavin  wrote:
>> leading
>> 0 are removed when opening a csv file by double clicking on it to open it
>> in excel.
>
> This is documented behaviour in Excel, which assumes that all cells contain 
> numbers, and therefore that leading zeros can be removed.  If you don't want 
> them removed you have to quote the value, e.g. "0123".

If you want the double quotes present in your MS Excel file, then you
can use the "01234"; otherwise, you can prefix it with the single
quote: '01234.


-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] make test fails because fuzzdata1.txt is missing

2015-05-28 Thread jungle Boogie
On 28 May 2015 at 08:24, Richard Hipp  wrote:
>> Not a huge deal but I ran make test today and this was the error:
>>
>> ./fuzzershell /home/user/fossil-repos/sqlite3/test/fuzzdata1.txt
>> /home/user/fossil-repos/sqlite3/test/fuzzdata2.txt
>> ./fuzzershell: cannot open
>> /home/user/fossil-repos/sqlite3/test/fuzzdata1.txt for reading
>> *** Signal 6
>
> The makefile should have changed to compensate.  Maybe you need to
> rerun configure?


Getting much further!

All memory allocations freed - no leaks
Memory used:  now  0  max 237856  max-size  64000
Allocation count: now  0  max572
Page-cache used:  now  0  max  0  max-size   1176
Page-cache overflow:  now  0  max 158152
Scratch memory used:  now  0  max  0
Scratch overflow: now  0  max   2560  max-size   2560
Maximum memory usage: 237856 bytes
Current memory usage: 0 bytes
Number of malloc()  : -1 calls
*** Error code 1

Stop.
make: stopped in /usr/home/user/fossil-repos/sqlite3

Is that anything to be concerned about?


-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] make test fails because fuzzdata1.txt is missing

2015-05-28 Thread jungle Boogie
Hello All,

Not a huge deal but I ran make test today and this was the error:

./fuzzershell /home/user/fossil-repos/sqlite3/test/fuzzdata1.txt
/home/user/fossil-repos/sqlite3/test/fuzzdata2.txt
./fuzzershell: cannot open
/home/user/fossil-repos/sqlite3/test/fuzzdata1.txt for reading
*** Signal 6

Stop.
make: stopped in /usr/home/user/fossil-repos/sqlite3

This file doesn't exist here:
https://sqlite.org/src/dir?ci=60a09f17d8b70dbc=test

It was deleted but in its own branch:
https://sqlite.org/src/finfo?name=test/fuzzdata1.txt


SQLite version 3.8.11 2015-05-27 19:35:08

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] build failure on trunk

2015-05-04 Thread jungle Boogie
On 4 May 2015 at 13:12, Richard Hipp  wrote:
> On 5/4/15, jungle Boogie  wrote:
>> Hello All,
>>
>> I don't think this is severe but just bringing it up as a new release
>> is imminent
>
> Try running "make clean; make"  Let us know if that fails to clear the 
> problem.

It does fail to clear it but running a subsequent make progresses through.

> --
> D. Richard Hipp
> drh at sqlite.org

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] build failure on trunk

2015-05-04 Thread jungle Boogie
Hello All,

I don't think this is severe but just bringing it up as a new release
is imminent
...
http://hastebin.com/dajofuzetu.md



-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] What software is deployed more than SQLite?

2015-05-04 Thread jungle Boogie
On 4 May 2015 at 10:01, Tim Streater  wrote:
> On 04 May 2015 at 17:31, jungle Boogie  wrote:
>
>> On 4 May 2015 at 07:58, Warren Young  wrote:
>>> On May 3, 2015, at 6:50 PM, jungle Boogie  
>>> wrote:
>>>>
>>>> On 3 May 2015 at 11:18, Richard Hipp  wrote:
>>>>> Any input you can provide is appreciated!
>>>>
>>>> Congratulations to you and your team on SQLite's achievement and I
>>>> wish you continued success.
>>>>
>>>> "Most Widely Deployed And Used Database Engine"
>>>>
>>>> I don't think the A in and needs capitalization.
>>>
>>> Both are correct.  The only incorrect thing to do is to mix styles on titles
>>> within a single work.
>>>
>>> http://www.quickanddirtytips.com/education/grammar/title-capitalization-rules
>>
>> This says small words don't need the capitalization...
>> http://grammar.yourdictionary.com/capitalization/rules-for-capitalization-in-t
>> itles.html
>
> In fact none of the words need capitalisation except the first. Otherwise it 
> looks like a 1930's newspaper headline.
>

I don't know if I'd go that far.

http://www.nytimes.com/

The articles there have the headlines capitalized.

but anyway, maybe we should get back to sqlite! ;)

> --
> Cheers  --  Tim
>


-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] What software is deployed more than SQLite?

2015-05-04 Thread jungle Boogie
On 4 May 2015 at 07:58, Warren Young  wrote:
> On May 3, 2015, at 6:50 PM, jungle Boogie  wrote:
>>
>> On 3 May 2015 at 11:18, Richard Hipp  wrote:
>>> Any input you can provide is appreciated!
>>
>> Congratulations to you and your team on SQLite's achievement and I
>> wish you continued success.
>>
>> "Most Widely Deployed And Used Database Engine"
>>
>> I don't think the A in and needs capitalization.
>
> Both are correct.  The only incorrect thing to do is to mix styles on titles 
> within a single work.
>
>   
> http://www.quickanddirtytips.com/education/grammar/title-capitalization-rules
>

This says small words don't need the capitalization...
http://grammar.yourdictionary.com/capitalization/rules-for-capitalization-in-titles.html

I'm just happy Richard isn't including a period at the end of the
title, like some people I know. ;)


> It?s kind of like C brace style, in that respect.

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] What software is deployed more than SQLite?

2015-05-03 Thread jungle Boogie
Hi Dr. Hipp,
On 3 May 2015 at 11:18, Richard Hipp  wrote:
> Any input you can provide is appreciated!

Congratulations to you and your team on SQLite's achievement and I
wish you continued success.

"Most Widely Deployed And Used Database Engine"

I don't think the A in and needs capitalization.


I like the list but consider having the two 'most's follow one another.
Simon's input is also good. Sqlite is a database engine so group like things!
Maybe even 'Every Apple product', if Sqlite is actually in all their products.

"SQLite is perhaps one of the top five most deployed software modules
of any description. It might even be the number one."

My suggestion:
SQLite is perhaps one of the top five most deployed software modules
of any description, it may even be the number one.

Also your links referencing the others are broken. I don't know if
that's because it's in a draft state/stage or if it's linking
incorrectly.



-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


Re: [sqlite] a couple of crashing bugs from a fuzzer

2015-01-08 Thread jungle Boogie
Richard,
On 8 January 2015 at 17:29, Richard Hipp  wrote:
> On 1/8/15, Michal Zalewski  wrote:
>
>> I have been running afl-fuzz against sqlite and bumped in a bunch of
>> bugs that seem to crash the sqlite3 binary
>
> Fixed here: https://www.sqlite.org/src/info/fe578863313128
>
> Bug report for your trophy case: 
> https://www.sqlite.org/src/info/a59ae93ee990a55
>
> Nice work.  I've never heard of afl-fuzz before, but you can bet I'm
> going to be studying up on it!
>
>

I wish you would work at my company! I found two lazy coding bugs
today and it will probably be several weeks before anyone is
'authorized' to review the cases and then weeks to consider repair.

Contrast that with you: You're giving sqlite away and fixing bugs
within 8 hours!

OpenBSD people have found many bugs with afl, too.

-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite3 internal performance

2014-12-28 Thread jungle Boogie
Hi Edward,
On 25 December 2014 at 19:33, Edward Lau  wrote:
>
> Hi Folks:
> I have read in many posting that SQLite is fast.  How fast is fast?  So over 
> this holiday break I tried to take a reading on the VDBE performance to get a 
> general idea.  I wrote a quick module to enable me to exercise the engine 
> simulating 32M rows without any IOs.  For each iteration I just increment a 
> counter and each call to xColumn() I pass the value of the counter back.  
> Starting from a baseline, I notice the time increase dramatically depending 
> what i am doing.  The performance is still fast in terms of elapsed time but 
> if measured by percentage degradation; it




> Edward Lau@T60p ~/myCprograms
> $ sqlite3
> SQLite version 3.8.4.3 2014-04-03 16:53:12


I don't have anything to add but perhaps a suggestion to try a more
recent version of sqlite to see if to makes a difference.

You may think 3.8.4 is not that old but look at this time line to
indicate how many modifications are made to source and site:
http://www.sqlite.org/docsrc/timeline

And there have been seven releases since 3.8.4.3.

Best,
jungle

-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Bug report on bug reporting page (grammatical errors)

2014-12-22 Thread Jungle Boogie

Hello All,

Page: https://www.sqlite.org/src/wiki?name=Bug+Reports

I recommend this change:

>what the problem is.

what the problem was.

Reason: Rest of discussion is in past tense.

>There were also numerous duplicates.

There were also numerous duplicate bug reports.

Reason: more complete sentence about what was duplicates.
--
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Student's t-test table

2014-11-16 Thread jungle Boogie
Hi Giuseppe,
On 16 November 2014 00:28, Giuseppe Costanzi  wrote:
> if it serves to someone I have attached it
>

Attachments don't come through, post a link to the file.

> regards
> 1966bc
>

Best,
jb


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [regression] SQLite 3.8.7 causes Evolution to crash

2014-10-23 Thread Jungle Boogie

Dear Richard, Ralf

From: Richard Hipp 
Sent:  Wed, 22 Oct 2014 21:53:36 -0400
To: General Discussion of SQLite Database  Cc: Ralf 
Mardorf 

Subject: Re: [sqlite] [regression] SQLite 3.8.7 causes Evolution to crash
>

On Wed, Oct 22, 2014 at 5:14 PM, Paul Menzel <
paulepan...@users.sourceforge.net> wrote:


Dear SQLite folks,


after the upgrade of libsqlite3 from 3.8.6 to 3.8.7 Evolution crashes
with a segmentation fault.

 pool[6371]: segfault at 0 ip   (null) sp a67d26ec error 14

Several people have reproduced this [1].



The problem *might* be an incomplete VFS implementation in Evolution.  I
put a more detailed comment on the Bugzilla ticket.




For posterity, Richard is right:
https://bugzilla.gnome.org/show_bug.cgi?id=738965


In the stack trace linked in Comment 1 above, in Thread 45, I see that the
SQLite routine sqlite3OsRead() invokes an external routine named
camel_sqlite3_file_xRead().  From this I presume that evolution is using a
custom VFS for SQLite that is implemented in the file named "camel-db.c".  Is
that correct?


Thanks for the investigation. You are absolutely right, camel-db provides its
own SQLite VFS to have delayed writes to a disk.


Dr. Hipp, thank you for all your efforts to continue making SQLite still so 
usable and powerful.




--
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SSL Rating on SQLite.org

2014-10-15 Thread Jungle Boogie

Hello All/Richard,

Unrelated to databases, sql, and sqlite but I noticed the poor rating on 
sqlite.org of an F:

https://www.ssllabs.com/ssltest/analyze.html?d=sqlite.org

It would be nice to have a better rating!

On the positive side, oracle.com doesn't even have an SSL for the homepage.

--
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Make a database read-only?

2014-10-14 Thread Jungle Boogie

Dear Ross,

From: Ross Altman 
Sent:  Tue, 14 Oct 2014 14:38:41 -0400
To: General Discussion of SQLite Database 
Subject: Re: [sqlite] Make a database read-only?
>

Thanks everyone for the helpful answers. Here's some context:

The database I have is for academic purposes. Research groups will need to
be able to download it in order to do large-scale scans using it as input,
so putting it in a wrapper (in PHP, say) isn't useful. But, I don't want
someone else to take it, add to it, and put it online somewhere else, so
that there are multiple versions floating around the web. I don't mind if
there are multiple COPIES, but I want to make sure that they're all the
same.



To a degree this sounds like the Streisand effect:
https://en.wikipedia.org/wiki/Streisand_effect


Pasting the sha256 is your best bet, but anyone who's going to verify the 
sha256 can already dump the database as explained by Clemens Ladisch.



Thanks again,
Ross




--
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite max arguments assistance

2014-09-22 Thread Jungle Boogie
Dear Simon,

From: Simon Slavin <slav...@bigfraud.org>
Sent:  Tue, 23 Sep 2014 00:29:32 +0100
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Subject: Re: [sqlite] sqlite max arguments assistance
>
> 
>> On 23 Sep 2014, at 12:24am, Jungle Boogie <jungleboog...@gmail.com> wrote:
>>
>> I did this:
>> sqlite> create table august
>> (MERCHANT_ID,DBA,WHITELABEL_ID,ORDER_ID,TRANSACTION_DISPLAY_DATE,TYPE,STATE,TRANSACTION_AMOUNT);
>> sqlite> .separator ","
>> sqlite> .import portalUseMonthly_20140901.csv august
>>
>> doing:
>> sqlite> .mode csv
>> sqlite> .import C:/work/somedata.csv tab
>> (with correct values)
>>
>> Results in .schema assuming everything as text
> 
> because you defined them as text yourself.  You need to put your column 
> affinities in the CREATE command.  Delete your existing table and try 
> something more like this:
> 
>> create table august
>> (MERCHANT_ID INTEGER, DBA TEXT, WHITELABEL_ID INTEGER, ORDER_ID INTEGER, 
>> TRANSACTION_DISPLAY_DATE TEXT, TYPE TEXT ,STATE TEXT, TRANSACTION_AMOUNT 
>> REAL);
> 

Works perfectly!
sqlite> select max(transaction_amount) from august;
66882.4

I'll have some reading and playing around!

Thanks so much for everyone's assistance on this armature problem of mine.

> Simon.
-- 
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite max arguments assistance

2014-09-22 Thread Jungle Boogie
Dear Kees,

From: Kees Nuyt 
Sent:  Mon, 22 Sep 2014 23:59:52 +0200
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] sqlite max arguments assistance
>
> and/or the receiving table doesn't define column
> transaction_amount as a numeric type (REAL, NUMBER, INTEGER and
> the like).
> By the way, lacking a currency or decimal type, the best way to
> represent money amounts is INTEGER, expressed as cents.
> 
>> Is there anything I can do post export from the other database to change the
>> values correctly?
> 
> Have a look at 
> http://sqlite.org/datatype3.html
> "2.3 Column Affinity Behavior Example"
> 

I did this:
sqlite> create table august
(MERCHANT_ID,DBA,WHITELABEL_ID,ORDER_ID,TRANSACTION_DISPLAY_DATE,TYPE,STATE,TRANSACTION_AMOUNT);
sqlite> .separator ","
sqlite> .import portalUseMonthly_20140901.csv august

doing:
sqlite> .mode csv
sqlite> .import C:/work/somedata.csv tab
(with correct values)

Results in .schema assuming everything as text

So I'll just need to make transaction_amount number

 
-- 
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite max arguments assistance

2014-09-22 Thread Jungle Boogie
Dear Igor,

From: Igor Tandetnik 
Sent:  Mon, 22 Sep 2014 16:34:18 -0400
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] sqlite max arguments assistance
>
> 
> Just as I thought. You are storing your values as text - not as numbers - and
> comparing them accordingly, in alphabetical order.

Looking at our non-production database, the transaction_amount is stored as
numbers: NUMBER(19,4)

 
-- 
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite max arguments assistance

2014-09-22 Thread Jungle Boogie
Dear Simon,

From: Simon Slavin <slav...@bigfraud.org>
Sent:  Mon, 22 Sep 2014 22:22:00 +0100
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Subject: Re: [sqlite] sqlite max arguments assistance
>
> 
> On 22 Sep 2014, at 10:02pm, Jungle Boogie <jungleboog...@gmail.com> wrote:
> 
>> Is there anything I can do post export from the other database to change the
>> values correctly?
> 
> You need to strip the dollar signs off at some stage.
> 
> Ideally you can do it in the CSV file before you import that into SQLite.
> 
> Alternatively you may be able to do the import into SQLite then issue the 
> following command:
> 
> UPDATE august SET transaction_amount = REPLACE(transaction_amount,'$','')
> 
> before you do your SELECT.
> 

Actually, none of the fields have the dollar sign, that's my mistake. Can I
tell sqlite pre or post import of the csv that the field is number or will it
always take it as it?

> Simon.
-- 
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite max arguments assistance

2014-09-22 Thread Jungle Boogie
Dear Igor,

From: Igor Tandetnik 
Sent:  Mon, 22 Sep 2014 16:34:18 -0400
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] sqlite max arguments assistance
>
> 
> Just as I thought. You are storing your values as text - not as numbers - and
> comparing them accordingly, in alphabetical order.

Sorry, I'm not certain I know the answer to this as I don't generate the data.
Opening the csv file in Excel, I did have to change the transaction_amount
column from "general" to "number". I think your assumptions are correct,
though. I'll see if I can look at the values in the other database.
 
I know the data is generated from a different database and a file is created,
portalusemonthly.csv that's sent to a location where I can get it?

Is there anything I can do post export from the other database to change the
values correctly?

-- 
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite max arguments assistance

2014-09-22 Thread jungle Boogie
Hi Igor,
On 22 September 2014 12:52, Igor Tandetnik  wrote:
>
>
> Dollar sign or not, the outcome you observe suggests that the values are
> stored as strings. What does this query return?
>
> select typeof(transaction_amount), count(*) from august group by 1;
>
> My guess is that most, if not all, rows would report
> typeof(transaction_amount) as 'text'.
>

typeof(transaction_amount)count(*)
text 135388


> --
> Igor Tandetnik
>


-- 
---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite max arguments assistance

2014-09-22 Thread Jungle Boogie
Dear Igor,

From: Igor Tandetnik <i...@tandetnik.org>
Sent:  Mon, 22 Sep 2014 15:25:43 -0400
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] sqlite max arguments assistance
>
> On 9/22/2014 3:12 PM, Jungle Boogie wrote:
>> select * from august where transaction_amount = (select
>> max(transaction_amount) from august)
>>
>> This statement should show be the merchant account with the top most 
>> expensive
>> transaction from my table called august.
>>
>> Result:
>> $999.63
> 
> The fact that the result is printed complete with $ sign suggests strongly
> that the values are stored, and compared, as strings. '$999.63' > '$16695.36'
> when using alphabetical comparison.


This is my mistake--ignore the dollar sign. I should have noted this
originally. Forgive me!

 
-- 
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite max arguments assistance

2014-09-22 Thread Jungle Boogie
Dear Simon,

From: Simon Slavin <slav...@bigfraud.org>
Sent:  Mon, 22 Sep 2014 20:14:08 +0100
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Subject: Re: [sqlite] sqlite max arguments assistance
>
> 
> On 22 Sep 2014, at 8:12pm, Jungle Boogie <jungleboog...@gmail.com> wrote:
> 
>> Result:
>> $999.63
>> (I trimmed out other items that I can't show).
>>
>> Same results with this: select max(transaction_amount) from august
>> $999.63
>>
>>
>> But this is NOT the most expensive amount, but it is for a three digit dollar
>> amount.
>>
>>
>> For example, this record is much higher in terms of transaction_amount:
>> $16695.36
> 
> What is the affinity of the transaction_amount column of your august table ?

Sorry, I don't know what this means. It looks like 50 grand is the largest
transaction amount, although Excel is having a hard time sorting the data well.


> 
> Simon.
-- 
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite max arguments assistance

2014-09-22 Thread Jungle Boogie
Hello All,

select * from august where transaction_amount = (select
max(transaction_amount) from august)

This statement should show be the merchant account with the top most expensive
transaction from my table called august.

Result:
$999.63
(I trimmed out other items that I can't show).

Same results with this: select max(transaction_amount) from august
$999.63


But this is NOT the most expensive amount, but it is for a three digit dollar
amount.


For example, this record is much higher in terms of transaction_amount:
$16695.36

This is a csv file that I've imported and I'm using SQLiteSpy with sqlite
3.8.6 as well as
FreeBSD lyander-fbsd 10.0-RELEASE-p9 FreeBSD 10.0-RELEASE-p9 #0: Mon Sep 15
14:32:29 UTC 2014
r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
also with sqlite3.8.6


How am i misunderstanding max?
-- 
inum: 883510009027723
sip: jungleboo...@sip2sip.info
xmpp: jungle-boo...@jit.si
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users