Re: [sqlite] imposter tables

2017-06-14 Thread Richard Hipp
On 6/14/17, Paul Sanderson wrote: > I am just taking a look at imposter tables and while the implementation is > neat I am just wondering what their use is, or rather what they can achieve > that a view can't achieve (and without the risk of DB corruption). Imposter

Re: [sqlite] Problem building amalgamation

2017-06-14 Thread Jens Alfke
> On Jun 14, 2017, at 11:03 AM, Simon Slavin wrote: > > This problem is especially bad on Apple devices, since many people use ".c" > as an extension for C++ files, when Apple’s compiler assumes they’ll use > ".cpp". I think you mean “.C” (with a capital C) which I’ve

Re: [sqlite] 3.19.3 README.md Doc bug

2017-06-14 Thread petern
I see. Replacing sqlite.tar.gz by sqlite-autoconf-3190300.tar.gz likewise produces the immediate directory 'sqlite-autoconf-3190300' rather than 'sqlite'. Taken literally, the instructions are indeed correct. I presumed, evidently incorrectly, that it would be preferrable to start in the

Re: [sqlite] Problem building amalgamation

2017-06-14 Thread Keith Medcalf
g++ assumes that all source input files are c++ sqlite3.c is C source, not C++ Compile the C files using gcc using the -c option (to output .o files) Compile the C++ files using gcc or g++ using the -c option (to output .o files) Link the files using g++ so that the c++ runtime is included OR

Re: [sqlite] Problem building amalgamation

2017-06-14 Thread Simon Slavin
On 14 Jun 2017, at 6:55pm, Clemens Ladisch wrote: > Jeff Archer wrote: >> I have just grabbed the sqlite3.c and sqlite3.h from another (working) >> project and dropped then into a new project and I am seeing compile errors. >> >> New project is a C++ project > > SQLite is

Re: [sqlite] Problem building amalgamation

2017-06-14 Thread Clemens Ladisch
Jeff Archer wrote: > I have just grabbed the sqlite3.c and sqlite3.h from another (working) > project and dropped then into a new project and I am seeing compile errors. > > New project is a C++ project SQLite is not C++ but C. Regards, Clemens ___

Re: [sqlite] imposter tables

2017-06-14 Thread Jens Alfke
> On Jun 14, 2017, at 4:52 AM, Paul Sanderson > wrote: > > I am just taking a look at imposter tables and while the implementation is > neat I am just wondering what their use is Well, right near the top of the page it says "Imposter tables are intended for

Re: [sqlite] INTEGER PRIMARY KEY AUTOINCREMENT

2017-06-14 Thread Peter Aronson
On 6/14/2017 5:42 AM, R Smith wrote: On 2017/06/14 7:08 AM, Wout Mertens wrote: Is there a way to specify the starting rowid when using autoincrement? Or should I insert and then remove a row with the id set to one less than the desired id? This is quite easy, but first it is helpful to

Re: [sqlite] 3.19.3 README.md Doc bug

2017-06-14 Thread John McKown
On Wed, Jun 14, 2017 at 10:40 AM, petern wrote: > Was there a version in the past where the compile instructions made sense? > > tar xzf sqlite.tar.gz;# Unpack the source tree into "sqlite" > mkdir bld;# Build will occur in a

[sqlite] 3.19.3 README.md Doc bug

2017-06-14 Thread petern
Was there a version in the past where the compile instructions made sense? tar xzf sqlite.tar.gz;# Unpack the source tree into "sqlite" mkdir bld;# Build will occur in a sibling directory cd bld ;# Change to the build directory

Re: [sqlite] performance issue on a read only database

2017-06-14 Thread Hervé Gauthier
Hi all, I tried the sugestion made by Clemens using PRAGMA locking_mode = EXCLUSIVE. This works fine for me. Thanks a lot. 2017-06-13 20:46 GMT+02:00 David Raymond : > "Also please note that SQLite does a 'lazy open'. When you create your > connection to the database

Re: [sqlite] imposter tables

2017-06-14 Thread Stephen Chrzanowski
I didn't know about this functionality. I know it is a 'sharp tool', but what I've gathered out by reading the document is that this only affects indexes, and if I understand the doc, only when the imposter table is created or is used to modify the indexes. What if an imposter table is created

[sqlite] Problem building amalgamation

2017-06-14 Thread Jeff Archer
SQLite 3.13.0 I have just grabbed the sqlite3.c and sqlite3.h from another (working) project and dropped then into a new project and I am seeing compile errors. New project is a C++ project in Eclipse. using GCC 5.4.0 from cygwin64. Just trying to make a simple command line app. I'm sure I'm

[sqlite] INTEGER PRIMARY KEY AUTOINCREMENT

2017-06-14 Thread wout.mertens
Thank you so much all! This mailinglist is amazing :) ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] INTEGER PRIMARY KEY AUTOINCREMENT

2017-06-14 Thread R Smith
On 2017/06/14 7:08 AM, Wout Mertens wrote: Is there a way to specify the starting rowid when using autoincrement? Or should I insert and then remove a row with the id set to one less than the desired id? This is quite easy, but first it is helpful to understand the mechanism by which SQLite

Re: [sqlite] imposter tables

2017-06-14 Thread Paul Sanderson
Can you create an imposter table on a view. A view has no associated b-tree so I would think not! Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for

[sqlite] imposter tables

2017-06-14 Thread Paul Sanderson
I am just taking a look at imposter tables and while the implementation is neat I am just wondering what their use is, or rather what they can achieve that a view can't achieve (and without the risk of DB corruption). For instance an imposter table created on an index such as the following from

Re: [sqlite] Outputting to CSV - row is not quoted when there are no spaces

2017-06-14 Thread Hick Gunter
I have found it much simpler and more robust to write a CSV virtual table to handle the formatting. e.g. CREATE VIRTUAL TABLE csv_input USING csv ( ); Opens the named file, reads the first line and interprets the contents as a list of field names. You can then INSERT INTO SELECT FROM

Re: [sqlite] Outputting to CSV - row is not quoted when there are no spaces

2017-06-14 Thread Ketil Froyn
Dan, I'd recommend using a tool that actually understands CSV, and make it parse the input and create new quoted output. I haven't seen your sed and awk, but I'm pretty sure it's easy to find some special cases where the text includes comma, quotes or even newlines that will break your output. A

Re: [sqlite] How-to and best practice for session extension

2017-06-14 Thread Robert M. Münch
Ok, after using the session extension and doing some tests, we face one problem I would like to get some feedback from the experts, how to best solve this. Context: User's can import CSV data into our application. We use a bunch of fixed tables and one for the user data. Of course the layout

Re: [sqlite] INTEGER PRIMARY KEY AUTOINCREMENT

2017-06-14 Thread J Decker
from https://sqlite.org/autoinc.html On an INSERT, if the ROWID or INTEGER PRIMARY KEY column is not explicitly given a value, then it will be filled automatically with an unused integer, usually one more than the largest ROWID currently in use. This is true regardless of whether or not the