Re: [sqlite] confused getting started

2017-03-06 Thread J Decker
On Mon, Mar 6, 2017 at 8:40 PM, Jens Alfke wrote: > > > On Mar 6, 2017, at 7:57 PM, J Decker wrote: > > > > Pretty silly since it is sqlite, and a mmap'ed database is pretty much > > sync > > Not really. The data still has to be paged in off the disk,

Re: [sqlite] confused getting started

2017-03-06 Thread Jens Alfke
> On Mar 6, 2017, at 7:57 PM, J Decker wrote: > > Pretty silly since it is sqlite, and a mmap'ed database is pretty much > sync Not really. The data still has to be paged in off the disk, which can take arbitrarily long (seconds, if the system is under heavy load), and

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
This is the bulk of what I needed thanks everyone for their help. This worked like a charm... Now on to why FreeNAS re-encodes the private key into something else... Thought I had it... SO CLOSE. Thanks all!!! ~Jake -- Jacob D. Sylvia Jake Sylvia's Consulting 430 Cole St. Seekonk, MA 02771

Re: [sqlite] confused getting started

2017-03-06 Thread J Decker
If Python is appealing then Node.js + sqlite adapter makes sqlite very easy. I have my own https://www.npmjs.com/package/sack.vfs Needs better docs on the Sqlite output I guess A more proper package that's all promises and async stuff... https://www.npmjs.com/package/sqlite Pretty

Re: [sqlite] SQLite 3.18.0 pre-release snapshot

2017-03-06 Thread jose isaias cabrera
Richard Hipp wrote... On 3/6/17, jose isaias cabrera wrote: Richard Hipp wrote... Have you ever wondered when you should run ANALYZE on an SQLite database? It is tricky to figure out when that is appropriate. The Thanks for this. I actually run this ANALYZE

Re: [sqlite] SQLite 3.18.0 pre-release snapshot

2017-03-06 Thread Richard Hipp
On 3/6/17, jose isaias cabrera wrote: > > Richard Hipp wrote... > >>Have you ever wondered when you should run ANALYZE on an SQLite >>database? It is tricky to figure out when that is appropriate. The > Thanks for this. I actually run this ANALYZE weekly with a script.

Re: [sqlite] SQLite 3.18.0 pre-release snapshot

2017-03-06 Thread jose isaias cabrera
Richard Hipp wrote... Have you ever wondered when you should run ANALYZE on an SQLite database? It is tricky to figure out when that is appropriate. The Thanks for this. I actually run this ANALYZE weekly with a script. This will be better. I can run it everyday don't do any harm.

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Keith Medcalf
Get rid of the funny quotes. bash (at least, and others) interprets funny quotes (backticks) as delimiters for commands which are to be executed by calling bash and inserting the results into the command. You only need delimiters around identifiers if you insist on using ill-conceived

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
I know what the problem was... bash was interpreting the `table_name` piece as a command. I had to escape the backticks... This looks like it's going to work like a charm!!! I'll report back! ~Jake -- Jacob D. Sylvia Jake Sylvia's Consulting 430 Cole St. Seekonk, MA 02771 Cell: (508) - 954 -

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Richard Hipp
On 3/6/17, Jacob Sylvia wrote: > > How can I check if that support is compiled in? > The readfile() SQL function was add to the command-line shell in SQLite version 3.8.6 released on 2014-08-15. -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
So apparently the version of sqlite3 that comes with FreeNAS (3.14.1 2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b) AND the (older) version that comes with Ubuntu 16.04 (3.11.0 2016-02-15 17:29:24 3d862f207e3adc00f78066799ac5a8c282430a5f) don't support the readfile method:

Re: [sqlite] SQLite 3.18.0 pre-release snapshot

2017-03-06 Thread Richard Hipp
On 3/6/17, Simon Slavin wrote: > >> See >> https://www.sqlite.org/draft/pragma.html#pragma_optimize for >> additional information. > > I’m sure this is extremely far-future-looking, but a default mask of 254 > (0xfe) might be better than the stated default of 14 (0x0e).

Re: [sqlite] sqlite3 feature or regression

2017-03-06 Thread Richard Hipp
For the benefit of those of us who do not do Ruby, perhaps you could explain in words what you think it is that SQLite is doing incorrectly? On 3/6/17, Vermes Mátyás wrote: > Hi, > I resend my earlier mail, now with an URL instead of attachement: > >

[sqlite] sqlite3 feature or regression

2017-03-06 Thread Vermes Mátyás
Hi, I resend my earlier mail, now with an URL instead of attachement: http://comfirm.hu/pub/sqlite3-regression.rb The linked ruby script demonstrates a feature of the newer sqlite3 libraries, which may be a regression. -- Vermes Mátyás

Re: [sqlite] SQLite 3.18.0 pre-release snapshot

2017-03-06 Thread Simon Slavin
On 6 Mar 2017, at 9:30pm, Richard Hipp wrote: > See > https://www.sqlite.org/draft/pragma.html#pragma_optimize for > additional information. I’m sure this is extremely far-future-looking, but a default mask of 254 (0xfe) might be better than the stated default of 14 (0x0e).

Re: [sqlite] SQLite 3.18.0 pre-release snapshot

2017-03-06 Thread Jens Alfke
> On Mar 6, 2017, at 1:30 PM, Richard Hipp wrote: > > Have you ever wondered when you should run ANALYZE on an SQLite > database? It is tricky to figure out when that is appropriate. The > new "PRAGMA optimize" command tries to automate the decision for you. Very nice!!

Re: [sqlite] .timer command missing from CLI ?

2017-03-06 Thread Simon Slavin
On 15 Feb 2017, at 7:22pm, Simon Slavin wrote: > sqlite> .changes on > sqlite> .timer on > Error: unknown command or invalid arguments: "timer". Enter ".help" for help Fix now committed and distributed to beta-testers. The commands '.timer on' and '.timer off' once

Re: [sqlite] sqlite3_set_last_insert_rowid()

2017-03-06 Thread Simon Slavin
On 6 Mar 2017, at 10:01pm, Richard Hipp wrote: > On 3/6/17, Simon Slavin wrote: >> >> This means that each TRIGGER is its own little story, right ? Triggers can >> make their own inserts. Which may themselves have triggers. SQLite >> maintains a happy

Re: [sqlite] sqlite3_set_last_insert_rowid()

2017-03-06 Thread Richard Hipp
On 3/6/17, Simon Slavin wrote: > > This means that each TRIGGER is its own little story, right ? Triggers can > make their own inserts. Which may themselves have triggers. SQLite > maintains a happy stack of values for last_insert_rowid(), pushing and > popping them each

[sqlite] sqlite3_set_last_insert_rowid()

2017-03-06 Thread Simon Slavin
On 6 Mar 2017, at 9:30pm, Richard Hipp wrote: >https://www.sqlite.org/draft/releaselog/3_18_0.html <--- Change log The mention of sqlite3_set_last_insert_rowid() reminds me of a question I have: Here’s the documentation for last_insert_rowid(): "If an INSERT occurs

[sqlite] SQLite 3.18.0 pre-release snapshot

2017-03-06 Thread Richard Hipp
There is a fresh source-code snapshot of the unreleased 3.18.0 version of SQLite up on the download page: https://www.sqlite.org/download.html https://www.sqlite.org/draft/releaselog/3_18_0.html <--- Change log Have you ever wondered when you should run ANALYZE on an SQLite database?

Re: [sqlite] confused getting started

2017-03-06 Thread R Smith
On 2017/03/05 1:03 PM, NTrewartha T-Online wrote: I too am new to DB's and Sqllite. Welcome! There is a GUI tool - which I think is better for learners which ought to be mentioned. http://sqlitebrowser.org/ The "DBBrowser for sqllite". DBBrowser for SQlite is great, and cross-platform.

Re: [sqlite] Unable to run SQLite programs: error 0xC000007b

2017-03-06 Thread R Smith
On 2017/03/06 5:34 PM, Rob Richardson wrote: Greetings! I used SQLite in a successful program a few years ago. I am trying to resurrect that program for a new customer, but it isn't working, and I'm having a hellish time trying to debug it. I have a Windows 7 XP1 OS, and I'm using Visual

Re: [sqlite] Multithread

2017-03-06 Thread Jens Alfke
> On Mar 6, 2017, at 7:10 AM, Наиль Шигапов wrote: > > Today for fetch or write information from different thread, i lock thread if > database is lock(write, read,e.t.c) But i don’t want lock my thread. I read > from documentation about «vfs» technology in sqlite.

Re: [sqlite] Unable to run SQLite programs: error 0xC000007b

2017-03-06 Thread Stephen Chrzanowski
Use explicit paths to where your database is opened from. Depending on where the application is run from, from the debugger even, it may launch the application from one place, but set its running directory to another. So your application may be trying to read the database file from somewhere

Re: [sqlite] confused getting started

2017-03-06 Thread Chris Locke
NT- I write a lot of vb.net programs that use sqlite databases, so will be happy to run though a beginners guide. It would be painless to convert from vb.net to c# Thanks, Chris ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] Unable to run SQLite programs: error 0xC000007b

2017-03-06 Thread Rob Richardson
Greetings! I used SQLite in a successful program a few years ago. I am trying to resurrect that program for a new customer, but it isn't working, and I'm having a hellish time trying to debug it. I have a Windows 7 XP1 OS, and I'm using Visual Studio 2008, which is what the original program

[sqlite] Multithread

2017-03-06 Thread Наиль Шигапов
Hellow! I write small orm based on sqlite database from ios - application! I have one or more question about multi-thread in sqlite. Today for fetch or write information from different thread, i lock thread if database is lock(write, read,e.t.c) But i don’t want lock my thread. I read from

Re: [sqlite] SQLite3.dll for x64

2017-03-06 Thread Chris Locke
Or user error. "Thanks. Also found out where I was going wrong. While creating the .lib file, weshould be using the following command: lib /def:sqlite3.def /machine:X64 /out:sqlite3.lib I was skipping the /machine:X64 option before." On Mon, Mar 6, 2017 at 10:48 AM, Anick Saha

Re: [sqlite] SQLite3.dll for x64

2017-03-06 Thread Scott Robison
On Mon, Mar 6, 2017 at 3:48 AM, Anick Saha wrote: > Hi, > > Please look into this issue: > http://stackoverflow.com/questions/42623284/sqlite3-dll-for-x64 > > My guess would be that the download link might be directing to the wrong > set of files. > As you've already

Re: [sqlite] [BUG REPORT] Open blob is invalidated by the update to unrelated fields in the same row

2017-03-06 Thread Scott Robison
On Mon, Mar 6, 2017 at 3:39 AM, Yuri wrote: > On 03/06/2017 01:00, Dominique Devienne wrote: > >> This is clearly documented inhttps://www.sqlite.org/c3ref/blob_open.html >> though, so I'm afraid this is "by design". --DD >> > > > Even though this is documented, parts of this

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
Keith, thanks! I *think* this is exactly what I'm looking for. I will try this as soon as I get home. ~Jake -- Jacob D. Sylvia Jake Sylvia's Consulting 430 Cole St. Seekonk, MA 02771 Cell: (508) - 954 - 2536 EMail: jacob.syl...@gmail.com Web: http://www.jacobsylvia.com On Mon, Mar 6, 2017 at

Re: [sqlite] Can sqlite3_blob_write be done through SQL?

2017-03-06 Thread James K. Lowden
On Sun, 5 Mar 2017 08:28:44 -0800 Yuri wrote: > > I think you?re better off reading the existing BLOB value into > > memory using SELECT, editing it using standard memory-manipulation > > routines, then writing it back with an UPDATE when you?re ready. > > This is very slow.

Re: [sqlite] confused getting started

2017-03-06 Thread Bob Friesenhahn
On Sun, 5 Mar 2017, Jens Alfke wrote: No offense intended, but SQLite isn’t an especially beginner-friendly tool. It’s a powerful relational database with a ton of configurable options, and a somewhat tricky C API, not to mention a sophisticated query language that you also need to master to

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Keith Medcalf
If you have a recent enough version of the SQLite3 command line shell: sqlite3 config.db "update table set value=readfile('pubkey.pem') where key='pubkey';" sqlite3 config.db "update table set value=readfile('privkey.pem') where key='privkey';" or, create a file, called for example,

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Hick Gunter
Try using the "here document" syntax. In .sh sqlite3 < set ='first line second line third line' where ; TheEnd -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Jacob Sylvia Gesendet: Montag, 06. März 2017 13:25 An: SQLite

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Clemens Ladisch
Jacob Sylvia wrote: > The problem lies in the 'value' part. Because the text has line breaks / > carriage returns, I can't figure out how to do it appropriately from the > command line. Just use line breaks: $ sqlite3 ":memory:" "select 'first line > second line';" first line second line

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
I guess I should have mentioned that I'm trying to do this from a script, so that makes the command shell difficult. ~Jake -- Jacob D. Sylvia Jake Sylvia's Consulting 430 Cole St. Seekonk, MA 02771 Cell: (508) - 954 - 2536 EMail: jacob.syl...@gmail.com Web: http://www.jacobsylvia.com On Mar 6,

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Hick Gunter
From sql shell (from a file works the same way): asql> create temp table test (a text); asql> insert into test values('a ...> b ...> c ...> d'); rows inserted - 1 asql> select * from test; a -- a b c d -Ursprüngliche Nachricht- Von: sqlite-users

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
Right... I know the syntax. The problem lies in the 'value' part. Because the text has line breaks / carriage returns, I can't figure out how to do it appropriately from the command line. I've tried setting the value in a bash variable, but the breaks get interpreted and the syntax fails. ~Jake

Re: [sqlite] Minor doc patches

2017-03-06 Thread Kim Gräsman
On Mon, Mar 6, 2017 at 12:36 PM, Richard Hipp wrote: > On 3/6/17, Kim Gräsman wrote: >> Hi all, >> >> I'm reading the documentation on memory >> (https://www.sqlite.org/malloc.html) again and stumbled on some typos: > > Thanks. Fixed now. Thanks! Already

Re: [sqlite] Minor doc patches

2017-03-06 Thread Richard Hipp
On 3/6/17, Kim Gräsman wrote: > Hi all, > > I'm reading the documentation on memory > (https://www.sqlite.org/malloc.html) again and stumbled on some typos: Thanks. Fixed now. -- D. Richard Hipp d...@sqlite.org ___

Re: [sqlite] [BUG REPORT] Open blob is invalidated by the update to unrelated fields in the same row

2017-03-06 Thread Clemens Ladisch
Yuri wrote: > Updating an integer field in the same row shouldn't affect the blob field. Integer fields have a variable size (0 to 8 bytes): http://www.sqlite.org/fileformat2.html#record_format Regards, Clemens ___ sqlite-users mailing list

Re: [sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Clemens Ladisch
Jacob Sylvia wrote: > Basically, I cant figure out how to update a text field in the sqlite > config database from the command line... sqlite3 config.db "UPDATE SomeTable SET SomeColumn = 'value' WHERE ID = 42" You need to know the database file name, the table name, the column name(s), the new

[sqlite] Minor doc patches

2017-03-06 Thread Kim Gräsman
Hi all, I'm reading the documentation on memory (https://www.sqlite.org/malloc.html) again and stumbled on some typos: > 3.3 Page cache memory > [... ] It is not unusual to see _the database page cache consumes_ over 10 > times more memory than the rest of SQLite combined. This should read

Re: [sqlite] [BUG REPORT] Open blob is invalidated by the update to unrelated fields in the same row

2017-03-06 Thread Hick Gunter
AFAICT It is not the new value of the integer but rather the new contents of the blob field that causes the record image to grow and exceed the previously allocated space, which means the row has to move. Rewriting the record and thus expiring the blob handle is triggered by the update of the

[sqlite] SQLite3.dll for x64

2017-03-06 Thread Anick Saha
Hi, Please look into this issue: http://stackoverflow.com/questions/42623284/sqlite3-dll-for-x64 My guess would be that the download link might be directing to the wrong set of files. Thanks, Anick ___ sqlite-users mailing list

[sqlite] Need some help running sqlite3 command line

2017-03-06 Thread Jacob Sylvia
Howdy all! I'm working on getting letsencrypt certificates into my FreeNAS installation... I can't find anyone who can help me with the last piece, the sqlite command line piece... The reference post is here:

Re: [sqlite] [BUG REPORT] Open blob is invalidated by the update to unrelated fields in the same row

2017-03-06 Thread Dominique Devienne
On Mon, Mar 6, 2017 at 11:39 AM, Yuri wrote: > On 03/06/2017 01:00, Dominique Devienne wrote: > >> This is clearly documented inhttps://www.sqlite.org/c3ref/blob_open.html >> though, so I'm afraid this is "by design". --DD >> > > Even though this is documented, parts of this

Re: [sqlite] [BUG REPORT] Open blob is invalidated by the update to unrelated fields in the same row

2017-03-06 Thread Yuri
On 03/06/2017 01:00, Dominique Devienne wrote: This is clearly documented inhttps://www.sqlite.org/c3ref/blob_open.html though, so I'm afraid this is "by design". --DD Even though this is documented, parts of this limitation don't appear to be reasonable. Updating an integer field in the

Re: [sqlite] [BUG REPORT] Open blob is invalidated by the update to unrelated fields in the same row

2017-03-06 Thread Dominique Devienne
On Sat, Mar 4, 2017 at 8:21 AM, Yuri wrote: > The write operation using the open sqlite3_blob object fails after some > other field in the same row is updated. > This is clearly documented in https://www.sqlite.org/c3ref/blob_open.html though, so I'm afraid this is "by design".