Re: [sqlite] BigInt loss accuracy

2019-02-23 Thread Clemens Ladisch
Derek Wang wrote: > sqlite biggest int is supposedly 9,223,372,036,854,775,807 (9 and a bit > Quintillion), but when the number is larger than 1E+17, it loses some > accuracy when retrieving. In plain SQL, everything works fine up to the limit: create table t(i notoriously big integer); with

Re: [sqlite] BigInt loss accuracy

2019-02-23 Thread Igor Tandetnik
On 2/23/2019 1:48 PM, Derek Wang wrote: x = 10 for i in range(22): x = 10*x y = x + 3 s = 'insert into bi values (%s, %s, %s)' % (i, y, y) Print `s`. I suspect you are losing precision on Python side, during text formatting. -- Igor Tandetnik

[sqlite] BigInt loss accuracy

2019-02-23 Thread Derek Wang
sqlite biggest int is supposedly 9,223,372,036,854,775,807 (9 and a bit Quintillion), but when the number is larger than 1E+17, it loses some accuracy when retrieving. see the following python codes: #store into sqlite: import sqlite3 sql_1 = """ CREATE TABLE IF NOT EXISTS bi (i integer,bi

Re: [sqlite] Disk I/O errors

2019-02-23 Thread Tim Streater
On 23 Feb 2019, at 19:30, Simon Slavin wrote: > On 23 Feb 2019, at 6:41pm, Tim Streater wrote: > >> The PHP interface to SQLite doesn't appear to give me access to the extended >> codes, unfortunately. > > I used to do SQLite from PHP myself. Hold on ... > > Bah. I agree with you. There

Re: [sqlite] Disk I/O errors

2019-02-23 Thread Dan Kennedy
On 24/2/62 00:55, Tim Streater wrote: (sorry for the duplicate - vibrating finger). I have a hosted web site using the SQLite functions from PHP. The page where PHP is used was failing, and on investigation this is because an SQLite function called from within PHP is now returning: Code: 10

Re: [sqlite] Disk I/O errors

2019-02-23 Thread Simon Slavin
On 23 Feb 2019, at 6:41pm, Tim Streater wrote: > The PHP interface to SQLite doesn't appear to give me access to the extended > codes, unfortunately. I used to do SQLite from PHP myself. Hold on ... Bah. I agree with you. There doesn't seem to be any way to do it. You can't even extend

Re: [sqlite] Disk I/O errors

2019-02-23 Thread Tim Streater
On 23 Feb 2019, at 18:10, Simon Slavin wrote: > On 23 Feb 2019, at 5:55pm, Tim Streater wrote: > >> I have a hosted web site using the SQLite functions from PHP. The page where >> PHP is used was failing, and on investigation this is because an SQLite >> function called from within PHP is now

Re: [sqlite] Disk I/O errors

2019-02-23 Thread Simon Slavin
On 23 Feb 2019, at 5:55pm, Tim Streater wrote: > I have a hosted web site using the SQLite functions from PHP. The page where > PHP is used was failing, and on investigation this is because an SQLite > function called from within PHP is now returning: > > Code: 10 (SQLITE_IOERR) > Msg: disk

[sqlite] Disk I/O errors

2019-02-23 Thread Tim Streater
(sorry for the duplicate - vibrating finger). I have a hosted web site using the SQLite functions from PHP. The page where PHP is used was failing, and on investigation this is because an SQLite function called from within PHP is now returning: Code: 10 (SQLITE_IOERR) Msg: disk I/O error I

[sqlite] Disk I/O errors

2019-02-23 Thread Tim Streater
I have a hosted web site using the SQLite functions from PHP. The page where PHP is used was failing, and on investigation this -- Cheers -- Tim ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] How to refer to `this` table?

2019-02-23 Thread Peter da Silva
As an aside, this schema seems to be violating https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ particularly rule 21. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] How to refer to `this` table?

2019-02-23 Thread Rocky Ji
I went from https://sqlite.org/lang_createtable.html to https://sqlite.org/syntax/table-constraint.html to https://sqlite.org/syntax/expr.html and figured expr of `check` in table constraint may contain a nested select after `not in`. On Sat, Feb 23, 2019, 1:24 PM Clemens Ladisch Rocky Ji