Re: [sqlite] sqlite journal file question

2015-02-13 Thread R.Smith
This was my initial reading too Paul, but reading the OP post again it could be either - who knows what is meant by syncing. I also think this is the main point for the OP - If by syncing he really means copying the file then Richard's advice, else if he means adding via normal DB connection

Re: [sqlite] sqlite journal file question

2015-02-13 Thread Paul Sanderson
Richard I read that the db on the standby machine is being updated at a record by record level, i.e. not copied in its entirety. In this scenario I can't see the two db files being guaranteed binary compatible. Copying the journal across in this scenario would imo be a mistake. Paul

[sqlite] sqlite journal file question

2015-02-12 Thread Mayank Kumar (mayankum)
Hi All We have two systems which are running in active/standby configuration. The active machine, is actively writing sqlite transactions to a file abcd.db. The standby is syncing the abcd.db file from the active machine on a communication channel and writing the delta records to the

Re: [sqlite] sqlite journal file question

2015-02-12 Thread Paul Sanderson
I would say no. The journal file stores pages referenced by page no and when replayed will write those pages back to the main DB at the appropriate physical offset. Although the content of your DB's at a logical level may be the same, it is unlikely that they will be exact copies at a binary level

Re: [sqlite] sqlite journal file question

2015-02-12 Thread R.Smith
I don't think it can be done, and if it could be done, it would not be wise. The journal is owned and specific to a connection. a hot Journal for connection A on DB 1 cannot ever be used to roll back or affect in any way connection B on DB 2. However, when you say the standby is syncing, I

Re: [sqlite] sqlite journal file question

2015-02-12 Thread Richard Hipp
On 2/12/15, Mayank Kumar (mayankum) mayan...@cisco.com wrote: Hi All We have two systems which are running in active/standby configuration. The active machine, is actively writing sqlite transactions to a file abcd.db. The standby is syncing the abcd.db file from the active machine on a

[sqlite] sqlite shell .import drops last cell if too less columns

2015-02-12 Thread udo . liess
Hi, here comes a bug report with fix proposal. If a CSV file contains a row with missing column, the previous cell will not be imported. Tested version: sqlite-shell-win32-x86-3080802.zip, sqlite-autoconf-3080802.tar.gz Steps to reproduce: - A file named data.csv with following content:

[sqlite] Sqlite Virtual Table Example with non-trivial xBestIndex (was: Porting SQLite to another operating system (not supported out of the box))

2015-02-11 Thread Hick Gunter
Having personally written about a dozen virtual table implementations I can confirm that those implementations needing a nontrivial xBestIndex function are all based on building an SQLite interface on substantial proprietary storage subsystems like an in-memory ISAM table (with configurable

[sqlite] SQLite Toolbox - free Visual Studio extension

2015-02-08 Thread Erik Ejlskov Jensen
I have recently released this free VS addin, also Works with the free VS 2013 Community edition. Blog post: http://erikej.blogspot.dk/2014/08/sqlite-toolbox-40-visual-guide-of.html Channel 9 video: http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/SQL-Server-Compact-and-SQLite-Toolbox

[sqlite] sqlite give database or disk full

2015-02-07 Thread jitendar kumar
Hello sqlite Users, I am using sqlite on arm-board and getting a database or disk full error (SQLITE_FULL) while using the update command. 1. DB file location is set to some /opt/dbspace/*.db. ( 32 Gb space and 4 GB RAM) 2. Not used compile time option SQLITE_TEMP_STORE so, deafult value 1.

Re: [sqlite] sqlite give database or disk full

2015-02-07 Thread Clemens Ladisch
jitendar kumar wrote: where is the temporary files location ?? 1. temp_directory, if set 2. SQLITE_TMPDR, if set 3. TMPDIR, if set 4. /var/tmp 5. /usr/tmp 6. /tmp Regards, Clemens ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SQLite 3.8.8 expected in January

2015-01-11 Thread RSmith
On 2015/01/10 15:50, Richard Hipp wrote: Yes, it was a compile-time omission. I have uploaded a new DLL that includes the loadable extension interface. Thank you - it works perfectly for all entries. All other tests worked well too, so no new problems to report from this side.

Re: [sqlite] SQLite Android Bindings: how difficult to add LOCALIZED back?

2015-01-11 Thread Philip Warner
On 9/01/2015 5:00 PM, Dan Kennedy wrote: On 01/08/2015 07:48 AM, Philip Warner wrote: How difficult would it be to add LOCALIZED collation support? I'm guessing that the fact it's not there means it's non-trivial, but I was hoping otherwise... The stumbling block is that the Android

Re: [sqlite] SQLite Android Bindings: how difficult to add LOCALIZED back?

2015-01-11 Thread Christian Werner
On 01/11/2015 01:55 PM, Philip Warner wrote: On 9/01/2015 5:00 PM, Dan Kennedy wrote: On 01/08/2015 07:48 AM, Philip Warner wrote: How difficult would it be to add LOCALIZED collation support? I'm guessing that the fact it's not there means it's non-trivial, but I was hoping otherwise...

Re: [sqlite] SQLite 3.8.8 expected in January

2015-01-10 Thread Richard Hipp
On 1/9/15, RSmith rsm...@rsweb.co.za wrote: The pre-compiled and supplied DLL (sqlite3.dll) seem to be missing an entry point for sqlite3_enable_load_extension - I do not see any mention in the update text about altering or removing this feature so I am assuming this might be a compile-time

Re: [sqlite] SQLite 3.8.8 expected in January

2015-01-09 Thread RSmith
The pre-compiled and supplied DLL (sqlite3.dll) seem to be missing an entry point for sqlite3_enable_load_extension - I do not see any mention in the update text about altering or removing this feature so I am assuming this might be a compile-time omission? On 2015/01/09 19:23, Richard Hipp

Re: [sqlite] SQLite 3.8.8 expected in January

2015-01-09 Thread Richard Hipp
On 1/9/15, Dominique Devienne ddevie...@gmail.com wrote: On Fri, Jan 9, 2015 at 6:23 PM, Richard Hipp d...@sqlite.org wrote: We hope to release SQLite version 3.8.8 sometime later this month (January). A change-log is available at https://www.sqlite.org/draft/releaselog/current.html Could

Re: [sqlite] sqlite data source not available

2015-01-09 Thread cc
I wish to add a confirmation to this. SQLite installation for 1.0.94.0 did not add the option for System.Data.Sqlite Database File to Choose Data Source dialog when adding ADO.NET Entity Data Model to my application. Using: ~ Visual Studio 2010 ~ VB.NET WinForms Application @ .NET 4.0 ~

Re: [sqlite] SQLite 3.8.8 expected in January

2015-01-09 Thread Dominique Devienne
On Fri, Jan 9, 2015 at 6:23 PM, Richard Hipp d...@sqlite.org wrote: We hope to release SQLite version 3.8.8 sometime later this month (January). A change-log is available at https://www.sqlite.org/draft/releaselog/current.html Could you please provide more info about stmt_scanstatus()?

[sqlite] SQLite 3.8.8 expected in January

2015-01-09 Thread Richard Hipp
We hope to release SQLite version 3.8.8 sometime later this month (January). A change-log is available at https://www.sqlite.org/draft/releaselog/current.html Please stress the code in every way you can between now and then and report any problems to this list, or directly to me. Source code

Re: [sqlite] SQLite Android Bindings: how difficult to add LOCALIZED back?

2015-01-08 Thread Dan Kennedy
On 01/08/2015 07:48 AM, Philip Warner wrote: I just saw the SQLite Android Bindings page at http://www.sqlite.org/android/doc/trunk/www/index.wiki but was a little disappointed to read in the details that UNICODE and LOCALIZED are not supported. I'd really like the latest SQLite, and

Re: [sqlite] Sqlite problem possible bug

2015-01-07 Thread Richard Hipp
On 1/7/15, The Responsa Project gr.respo...@biu.ac.il wrote: To Whom it amy concern I am trying to use SQLITE and the like statement with wildcards and hebrew when I put in an english string it works correctly, such as Select * from dbname where colname like '%123%' I will get all the

[sqlite] Sqlite problem possible bug

2015-01-07 Thread The Responsa Project
To Whom it amy concern I am trying to use SQLITE and the like statement with wildcards and hebrew when I put in an english string it works correctly, such as Select * from dbname where colname like '%123%' I will get all the entries from that column that contain 123 anywhere in the column.

[sqlite] SQLite Android Bindings: how difficult to add LOCALIZED back?

2015-01-07 Thread Philip Warner
I just saw the SQLite Android Bindings page at http://www.sqlite.org/android/doc/trunk/www/index.wiki but was a little disappointed to read in the details that UNICODE and LOCALIZED are not supported. I'd really like the latest SQLite, and LOCALIZED. How difficult would it be to add

Re: [sqlite] Sqlite problem possible bug

2015-01-07 Thread RSmith
On 2015/01/07 12:13, The Responsa Project wrote: To Whom it amy concern I am trying to use SQLITE and the like statement with wildcards and hebrew when I put in an english string it works correctly, such as Select * from dbname where colname like '%123%' I will get all the entries from

Re: [sqlite] Sqlite problem possible bug

2015-01-07 Thread Yongil Jang
How about to use dynamic binding? For example, is your SQL(SELECT * from dbname where colname like '%אב%'), use '?' instead of 'אב'. In my guess, 'אב' can have same ASCII code of wildcard(%). Full SQL can be as like as follows. SELECT * from dbname where colname like '%?%' To do this, you need

[sqlite] sqlite login password

2015-01-03 Thread YAN HONG YE
I want to know how to setting a loging sqlite passwd? When I input: Sqlite mtdb Command, the console will prompt like this: Pls input your password: ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] sqlite login password

2015-01-03 Thread Simon Slavin
On 4 Jan 2015, at 12:56am, YAN HONG YE yanhong...@mpsa.com wrote: I want to know how to setting a loging sqlite passwd? When I input: Sqlite mtdb Command, the console will prompt like this: Pls input your password: http://www.sqlite.org/src/doc/trunk/ext/userauth/user-auth.txt It is only

Re: [sqlite] sqlite login password

2015-01-03 Thread Richard Hipp
On Sat, Jan 3, 2015 at 7:59 PM, Simon Slavin slav...@bigfraud.org wrote: On 4 Jan 2015, at 12:56am, YAN HONG YE yanhong...@mpsa.com wrote: I want to know how to setting a loging sqlite passwd? When I input: Sqlite mtdb Command, the console will prompt like this: Pls input your

Re: [sqlite] sqlite login password

2015-01-03 Thread Simon Slavin
On 4 Jan 2015, at 1:00am, Richard Hipp d...@sqlite.org wrote: (1) The OP says he used the sqlite command (version 2 of SQLite) not sqlite3. (2) SQLite has *never* given a prompt Pls input your password. That message is coming from third-party software. I agree that my answer has nothing to

Re: [sqlite] sqlite login password

2015-01-03 Thread Stephen Chrzanowski
Maybe the question is How do I make SQLite do this when accessing a database? and the 3 just got dropped inadvertently. If that is the case, as Dr. Hipp said, SQLite has never done it, and I'll add on that it has never done it stock. On the other hand, that link you posted, Dr. Hipp, is rather

[sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread Kushagradhi Bhowmik
I am writing continuously into a db file which has PRAGMA journal_mode=WAL, PRAGMA journal_size_limit=0. My C++ program has two threads, one reader(queries at 15 sec intervals) and one writer(inserts at 5 sec intervals). Every 3 min I am pausing insertion to run a sqlite3_wal_checkpoint_v2() from

Re: [sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread GB
Readers do not need long-lasting transactions (if any at all), so I'd rather suspect your writer to be the culprit. Does it use lasting transactions? If so, make it commit the transaction before checkpointing. regards gerd ___ sqlite-users mailing

Re: [sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread Dan Kennedy
On 12/19/2014 11:22 AM, Kushagradhi Bhowmik wrote: I am writing continuously into a db file which has PRAGMA journal_mode=WAL, PRAGMA journal_size_limit=0. My C++ program has two threads, one reader(queries at 15 sec intervals) and one writer(inserts at 5 sec intervals). Every 3 min I am

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-09 Thread James K. Lowden
On Mon, 08 Dec 2014 22:01:15 +0700 Dan Kennedy danielk1...@gmail.com wrote: On 12/08/2014 09:55 PM, Nico Williams wrote: Ideally there would be something like DEFERRED foreign key checking for uniqueness constraints... You could hack SQLite to do enforce unique constraints the same way

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-09 Thread James K. Lowden
On Mon, 08 Dec 2014 15:48:41 +0200 RSmith rsm...@rsweb.co.za wrote: UPDATE pages SET position = position + 1 WHERE book_id = 0 AND position = 1; NOT a bug... the moment you SET position to position +1 for the first iteration of the query, it tries to make that entry look like (0,2) and

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-09 Thread J T
-users sqlite-users@sqlite.org Sent: Tue, Dec 9, 2014 10:38 am Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail On Mon, 08 Dec 2014 22:01:15 +0700 Dan Kennedy danielk1...@gmail.com wrote: On 12/08/2014 09:55 PM, Nico Williams wrote: Ideally there would

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-09 Thread J T
Discussion of SQLite Database sqlite-users@sqlite.org Sent: Mon, Dec 8, 2014 12:07 pm Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail Le 8 déc. 2014 à 17:21, Simon Slavin slav...@bigfraud.org a écrit : Why not an opt-in way to ask for deferred constraint checking

[sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Shinichiro Yoshioka
Hi, I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. But although the compiling was successfully finished, even if I set break point on the source code, I can't trace the working line in sqlite3.c correctly. I suspected that the sqlite3.c was optimized, but there is no opiton like

Re: [sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Clemens Ladisch
Shinichiro Yoshioka wrote: I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. But although the compiling was successfully finished, even if I set break point on the source code, I can't trace the working line in sqlite3.c correctly. How exactly are you using SQLite in your

Re: [sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Martin Engelschalk
Hi Shinichiro, which Version of VC++ do you use? As far as I know, older versions do not support debugging source files with more than 65535 lines. Also, why do you want to debug into the sqlite.c file? The file sqlite.c is just another source file for your compiler; optimizations would

Re: [sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Shinichiro Yoshioka
Hi, Clemens and Martin, Thank you for your prompt responses. How exactly are you using SQLite in your program? If you are not using the SQLite C API (sqlite3_* functions) directly, I'm using sqlite APIs for calling from C source code directly. which Version of VC++ do you use? I'm using

Re: [sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Martin Engelschalk
Hi Shinichiro, If opening the database failed with sqlite3_open() != SQLITE_OK, it is probably best to check the return code and error message using sqlite3_errmsg(). It will give a strong hint. Debugging into the sqlite3 code itself never worked for me. Make sure that - the directory the

[sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
Hi, Unique indexes make some valid update queries fail. Please find below the SQL queries that lead to the unexpected error: -- The `books` and `pages` tables implement a book with several pages. -- Page ordering is implemented via the `position` column in the pages table. -- A unique index

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Richard Hipp
On Mon, Dec 8, 2014 at 4:55 AM, Gwendal Roué g...@pierlis.com wrote: Hi, Unique indexes make some valid update queries fail. Please find below the SQL queries that lead to the unexpected error: -- The `books` and `pages` tables implement a book with several pages. -- Page ordering is

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread J T
Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail On Mon, Dec 8, 2014 at 4:55 AM, Gwendal Roué g...@pierlis.com wrote: Hi, Unique indexes make some valid update queries fail. Please find below the SQL queries that lead to the unexpected error: -- The `books

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
Le 8 déc. 2014 à 14:14, Richard Hipp d...@sqlite.org a écrit : On Mon, Dec 8, 2014 at 4:55 AM, Gwendal Roué g...@pierlis.com wrote: Hi, Unique indexes make some valid update queries fail. Please find below the SQL queries that lead to the unexpected error: -- The `books` and

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
To: General Discussion of SQLite Database sqlite-users@sqlite.org Sent: Mon, Dec 8, 2014 8:14 am Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail On Mon, Dec 8, 2014 at 4:55 AM, Gwendal Roué g...@pierlis.com wrote: Hi, Unique indexes make some valid

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Simon Slavin
On 8 Dec 2014, at 1:31pm, Gwendal Roué g...@pierlis.com wrote: We share the same conclusion. I even tried to decorate the update query with ORDER clauses, in a foolish attempt to reverse the ordering of row updates, and circumvent the issue. A way to solve this is to use REAL for page

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
: [sqlite] sqlite bugreport : unique index causes valid updates to fail On Mon, Dec 8, 2014 at 4:55 AM, Gwendal Roué g...@pierlis.com wrote: Hi, Unique indexes make some valid update queries fail. Please find below the SQL queries that lead to the unexpected error: -- The `books

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
Le 8 déc. 2014 à 14:39, Simon Slavin slav...@bigfraud.org a écrit : On 8 Dec 2014, at 1:31pm, Gwendal Roué g...@pierlis.com wrote: We share the same conclusion. I even tried to decorate the update query with ORDER clauses, in a foolish attempt to reverse the ordering of row updates,

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread J T
Discussion of SQLite Database sqlite-users@sqlite.org Sent: Mon, Dec 8, 2014 8:40 am Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail J T, I did provide a sequence of queries that reliably reproduce the issue (see below, from the first CREATE to the last UPDATE

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread RSmith
On 2014/12/08 11:55, Gwendal Roué wrote: Hi, Unique indexes make some valid update queries fail. Please find below the SQL queries that lead to the unexpected error: -- The `books` and `pages` tables implement a book with several pages. -- Page ordering is implemented via the `position`

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
Le 8 déc. 2014 à 14:48, RSmith rsm...@rsweb.co.za a écrit : On 2014/12/08 11:55, Gwendal Roué wrote: Hi, Unique indexes make some valid update queries fail. Please find below the SQL queries that lead to the unexpected error: -- The `books` and `pages` tables implement a book with

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread RSmith
On 2014/12/08 15:58, Gwendal Roué wrote: I'm new to this mailing list, and I won't try to push my opinion, which is : yes this is a bug, and this bug could be fixed without introducing any regression (since fixing it would cause failing code to suddenly run, and this has never been a

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Marc L. Allen
I am like you, Gwendal, in that I don't like that behavior in SQLite; however, not liking it doesn't make it a bug. The constraint-checking algorithm was defined to work exactly the way it's working. When designed, the fact that your type of insert would fail was known and understood. Hence,

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread John McKown
On Mon, Dec 8, 2014 at 8:15 AM, Marc L. Allen mlal...@outsitenetworks.com wrote: I am like you, Gwendal, in that I don't like that behavior in SQLite; however, not liking it doesn't make it a bug. ​On another of my forums, this is called a BAD - Broken, As Designed.​ As opposed to the normal

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread J T
- From: RSmith rsm...@rsweb.co.za To: General Discussion of SQLite Database sqlite-users@sqlite.org Sent: Mon, Dec 8, 2014 9:15 am Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail On 2014/12/08 15:58, Gwendal Roué wrote: I'm new to this mailing list, and I won't

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Marc L. Allen
: Monday, December 08, 2014 9:18 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail On Mon, Dec 8, 2014 at 8:15 AM, Marc L. Allen mlal...@outsitenetworks.com wrote: I am like you, Gwendal, in that I don't like that behavior

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread J T
Cancel that, apparently that only updates the last record... -Original Message- From: John McKown john.archie.mck...@gmail.com To: General Discussion of SQLite Database sqlite-users@sqlite.org Sent: Mon, Dec 8, 2014 9:18 am Subject: Re: [sqlite] sqlite bugreport : unique index

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
Le 8 déc. 2014 à 15:18, John McKown john.archie.mck...@gmail.com a écrit : On Mon, Dec 8, 2014 at 8:15 AM, Marc L. Allen mlal...@outsitenetworks.com wrote: I am like you, Gwendal, in that I don't like that behavior in SQLite; however, not liking it doesn't make it a bug. ​On another

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Marc L. Allen
...@rsweb.co.za; sqlite-users@sqlite.org Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail Might have another work around. update page set position=position + 1 where designation=(select designation from page where book='1' order by position desc) and then insert your

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Luuk
On 8-12-2014 14:58, Gwendal Roué wrote: Le 8 déc. 2014 à 14:48, RSmith rsm...@rsweb.co.za a écrit : On 2014/12/08 11:55, Gwendal Roué wrote: Hi, Unique indexes make some valid update queries fail. Please find below the SQL queries that lead to the unexpected error: -- The `books` and

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread John McKown
On Mon, Dec 8, 2014 at 8:23 AM, Marc L. Allen mlal...@outsitenetworks.com wrote: I'm not sure I'd even consider it broken. ​Well, to some on that forum: If it doesn't work the way that _I_ want, then it is ipso-facto broken. And I forgot the grin/ in my message. Sorry.​ SQLite is

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Nico Williams
Ideally there would be something like DEFERRED foreign key checking for uniqueness constraints... You can get something like that by using non-unique indexes (but there would also go your primary keys) and then check that there are no duplicates before you COMMIT. (Doing this reliably would

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Dan Kennedy
On 12/08/2014 09:55 PM, Nico Williams wrote: Ideally there would be something like DEFERRED foreign key checking for uniqueness constraints... You could hack SQLite to do enforce unique constraints the same way as FKs. When adding an entry to a UNIQUE index b-tree, you check for a duplicate.

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
Yes, that would be nice. For example, sqlite already needs explicit opt-in for some of the relational toolkit. I think about PRAGMA foreign_keys = ON. Why not an opt-in way to ask for deferred constraint checking. The key here is only to allow perfectly legit requests to run. With all the due

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Simon Slavin
On 8 Dec 2014, at 3:05pm, Gwendal Roué g...@pierlis.com wrote: Why not an opt-in way to ask for deferred constraint checking. The key here is only to allow perfectly legit requests to run. With all the due respect to sqlite implementors and the wonderful design of sqlite. SQL-99 includes a

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Gwendal Roué
Le 8 déc. 2014 à 17:21, Simon Slavin slav...@bigfraud.org a écrit : Why not an opt-in way to ask for deferred constraint checking. The key here is only to allow perfectly legit requests to run. With all the due respect to sqlite implementors and the wonderful design of sqlite. SQL-99

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Nico Williams
On Mon, Dec 8, 2014 at 9:01 AM, Dan Kennedy danielk1...@gmail.com wrote: You could hack SQLite to do enforce unique constraints the same way as FKs. When adding an entry to a UNIQUE index b-tree, you check for a duplicate. If one exists, increment a counter. Do the opposite when removing

Re: [sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Scott Robison
On Dec 8, 2014 2:10 AM, Shinichiro Yoshioka dekochan...@gmail.com wrote: Hi, I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. But although the compiling was successfully finished, even if I set break point on the source code, I can't trace the working line in sqlite3.c

Re: [sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Richard Hipp
:~/sqlite/bld$ make sqlite3-all.c tclsh /home/drh/sqlite/sqlite/tool/split-sqlite3c.tcl drh@bella:~/sqlite/bld$ wc sqlite3-*.c 32314 165952 1228350 sqlite3-1.c 30892 145495 1098859 sqlite3-2.c 32729 144742 1091870 sqlite3-3.c 32481 150359 1198841 sqlite3-4.c 23259 100070 768733 sqlite3-5

Re: [sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Shinichiro Yoshioka
and it will generate a version of the amalgamation that #includes a handful of separate files (named sqlite3-N.c for N=1,2,3,), each less than 32K lines in size. drh@bella:~/sqlite/bld$ make sqlite3-all.c tclsh /home/drh/sqlite/sqlite/tool/split-sqlite3c.tcl drh@bella:~/sqlite/bld$ wc

Re: [sqlite] [sqlite-dev] Implementing per-value custom types

2014-11-28 Thread Sohail Somani
On 2014-11-26, 7:53 AM, RSmith wrote: The fact that inside of SQLite an Integer can be stored in different ways is simply a code/data/space optimisation for SQLite, it is transparent to the user and transparent to the SQL - it is in no way intended as a data-feature or extension of the SQL

Re: [sqlite] [sqlite-dev] Implementing per-value custom types

2014-11-26 Thread Darko Volaric
That's not true. A 64 bit floating point number and an 64 bit integer can be represented by the exact same 64 bit pattern, and no-one would suggest they're the same value. You can have those two differently typed although identical bit values in the same SQLite column. The data identifying the

Re: [sqlite] [sqlite-dev] Implementing per-value custom types

2014-11-26 Thread RSmith
Hi Darko, Firstly, kindly keep this to the sqlite-users forum and not on the dev forum (the devs read this too, the difference being simply that this one exists to help you, the other one is to discuss development stuff, not to help anyone). Secondly, you are confusing two things. You are

Re: [sqlite] [sqlite-dev] Implementing per-value custom types

2014-11-26 Thread Darko Volaric
The person I replied to cross posted, not I, and I didn't realise this before I replied to his cross post and the I couldn't change it then, so maybe take that up with him. I'm not confusing anything. You, and the other posters, are confusing the representation of values and the concrete value

Re: [sqlite] [sqlite-dev] Implementing per-value custom types

2014-11-26 Thread RSmith
On 2014/11/26 15:58, Darko Volaric wrote: I'm not looking for confirmation of ideas, on the contrary, people seem to want to push their own ideas about a database should be used and how I'm not using it correctly, when that is irrlevent to the issue I'm discussing. Maybe more focus on the

Re: [sqlite] [sqlite-dev] Implementing per-value custom types

2014-11-26 Thread Darko Volaric
You wrote: From the tone of your last post (if I am reading correctly) I understand that you have your mind set on finding a way that you have thought about a lot lying in your bed late at night, you have rolled it around in your head and you just feel this should be doable and will be so elegant

Re: [sqlite] [sqlite-dev] Implementing per-value custom types

2014-11-26 Thread J Decker
a type column to go with variant data would probably be best... how many columns do you have that are actually self-described typedata required? could just serialize it to a blob; include type, and the value... kinda hard to select for a value that way... at least if it's a parallel type the

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-14 Thread Dominique Devienne
On Thu, Nov 13, 2014 at 6:53 PM, RSmith rsm...@rsweb.co.za wrote: By the way, my Oracle friends should intersect here if need be, but I believe the oracle method of /decimal(n,m)/ is simply a representation directive and constraint, there is no native datatype that actually stores or

[sqlite] sqlite Issue

2014-11-14 Thread ARVIND KUMAR
Hi, I am new for SQLite. I am trying to create database. But its not creating. I have attached the screenshot. Please find and do needful. Thanks Regards Arvind ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-14 Thread Simon Slavin
On 14 Nov 2014, at 3:42am, James K. Lowden jklow...@schemamania.org wrote: Simon Slavin slav...@bigfraud.org wrote: I'm not aware of any usable libraries which actually support 23,10 outside the world of physics. http://www.mpfr.org/#free-sw I'm sure you're aware of such things.

Re: [sqlite] sqlite Issue

2014-11-14 Thread Simon Slavin
On 14 Nov 2014, at 10:40am, ARVIND KUMAR arv...@sblsoftware.com wrote: I am new for SQLite. I am trying to create database. But its not creating. I have attached the screenshot. Please find and do needful. You cannot post screenshots to this mailing list. Most problems with creating a new

Re: [sqlite] sqlite Issue

2014-11-14 Thread Stephen Chrzanowski
If you're using SQLite3.exe (or equivalent CLI - Command Line Interface) then by default the database id written to memory, not to the disk. Doing something like [ sqlite3.exe test.db3] will create a test.db3 file once you do an actual transaction like creating a table. I THINK even doing a

[sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Dinesh Navsupe
Hi, Does any of SQLite data Type support 23,10 precision format for Number? If yes, could you pleas help with right data type or approach to achieve this. If No, then is there something that can be added to SQLite and how quickly? Thanks, Dinesh Navsupe

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Simon Slavin
On 13 Nov 2014, at 12:23pm, Dinesh Navsupe dinesh.navs...@gmail.com wrote: Does any of SQLite data Type support 23,10 precision format for Number? If yes, could you pleas help with right data type or approach to achieve this. SQL stores REAL numbers in a REAL field which conforms to 64-bit

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Hick Gunter
[mailto:dinesh.navs...@gmail.com] Gesendet: Donnerstag, 13. November 2014 13:23 An: sqlite-users@sqlite.org Betreff: [sqlite] [SQLite] Support for 23,10 Precision number format Hi, Does any of SQLite data Type support 23,10 precision format for Number? If yes, could you pleas help with right data

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Dinesh Navsupe
Hi, My need is 23 decimal digits of precision. We work on complex payout calculation engine where in formula outputs are quite large numbers and clients do not want to round off. We want to use SQLite for local disk data store and calculations. Thanks, Dinesh Navsupe On Thu, Nov 13, 2014 at

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread RSmith
On 2014/11/13 15:01, Dinesh Navsupe wrote: Hi, My need is 23 decimal digits of precision. We work on complex payout calculation engine where in formula outputs are quite large numbers and clients do not want to round off. I do not think that re-stating your need suffices as a good enough

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Dominique Devienne
On Thu, Nov 13, 2014 at 2:33 PM, RSmith rsm...@rsweb.co.za wrote: On 2014/11/13 15:01, Dinesh Navsupe wrote: My need is 23 decimal digits of precision. We work on complex payout calculation engine where in formula outputs are quite large numbers and clients do not want to round off. If

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Simon Slavin
On 13 Nov 2014, at 1:01pm, Dinesh Navsupe dinesh.navs...@gmail.com wrote: My need is 23 decimal digits of precision. We work on complex payout calculation engine where in formula outputs are quite large numbers and clients do not want to round off. If you're working with floating-point

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Dominique Devienne
On Thu, Nov 13, 2014 at 3:38 PM, Simon Slavin slav...@bigfraud.org wrote: On 13 Nov 2014, at 1:01pm, Dinesh Navsupe dinesh.navs...@gmail.com wrote: My need is 23 decimal digits of precision. We work on complex payout calculation engine where in formula outputs are quite large numbers and

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Dinesh Navsupe
You are right Dominique. I mean Oracle's NUMBER(23, 10), and given [1], that's more 9,999,999,999,999.99 Thanks. On Thu, Nov 13, 2014 at 9:14 PM, Dominique Devienne ddevie...@gmail.com wrote: On Thu, Nov 13, 2014 at 3:38 PM, Simon Slavin slav...@bigfraud.org wrote: On 13 Nov

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Stephan Beal
On Thu, Nov 13, 2014 at 4:50 PM, Dinesh Navsupe dinesh.navs...@gmail.com wrote: I mean Oracle's NUMBER(23, 10), and given [1], that's more My need is 23 decimal digits of precision. We work on complex payout calculation engine where in formula outputs are quite large numbers and

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Simon Slavin
On 13 Nov 2014, at 3:44pm, Dominique Devienne ddevie...@gmail.com wrote: On Thu, Nov 13, 2014 at 3:38 PM, Simon Slavin slav...@bigfraud.org wrote: 100,000,000,000,000,000,000 Assuming he means Oracle's NUMBER(23, 10), and given [1], that's more 9,999,999,999,999.99 i.e. just

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread RSmith
On 2014/11/13 19:06, Simon Slavin wrote: On Thu, Nov 13, 2014 at 3:38 PM, Simon Slavin slav...@bigfraud.org wrote: 100,000,000,000,000,000,000 But he's using the field to store an amount of money in. So why ask for anything with ten places after the decimal point ? No genuine currency

Re: [sqlite] [SQLite] Support for 23,10 Precision number format

2014-11-13 Thread Hick Gunter
of SQLite Database Betreff: Re: [sqlite] [SQLite] Support for 23,10 Precision number format On 13 Nov 2014, at 3:44pm, Dominique Devienne ddevie...@gmail.com wrote: On Thu, Nov 13, 2014 at 3:38 PM, Simon Slavin slav...@bigfraud.org wrote: 100,000,000,000,000,000,000 Assuming he means

[sqlite] sqlite bug report

2014-11-13 Thread Hinrichsen, John
The following SQL produces an incorrect result with sqlite-3.8.7.1: CREATE TABLE A( symbol TEXT, type TEXT ); INSERT INTO A VALUES('ABCDEFG','chars'); INSERT INTO A VALUES('1234567890','num'); CREATE TABLE B( chars TEXT, num TEXT ); CREATE TABLE IF NOT EXISTS C AS SELECT A.symbol AS

Re: [sqlite] sqlite bug report

2014-11-13 Thread Richard Hipp
This is https://www.sqlite.org/src/info/094d39a4c95ee4 which has been fixed in trunk and will be fixed in 3.8.7.2. On Thu, Nov 13, 2014 at 1:05 PM, Hinrichsen, John jhinrich...@c10p.com wrote: The following SQL produces an incorrect result with sqlite-3.8.7.1: CREATE TABLE A( symbol TEXT,

  1   2   3   4   5   6   7   8   9   10   >