Re: [sqlite] Option to control implicit casting

2019-04-09 Thread James K. Lowden
On Mon, 8 Apr 2019 23:08:18 -0400 Joshua Thomas Wise wrote: > I propose there should be a compile-time option to disable all > implicit casting done within the SQL virtual machine. You can use SQLite in a "strict" way: write a CHECK constraint for every numerical column. Just don't do that

Re: [sqlite] How to use ORDER BY on FTS5 table ?

2019-04-09 Thread Jens Alfke
> On Apr 5, 2019, at 2:59 PM, Nik Jain wrote: > > One way is to run 2 queries. First on the fts table, to > return ids. Second on the regular table with the order by clause. " select > * from normaltable where id in (Ids) order by price " . This approach is > fast. But the id list could be

[sqlite] compressed sqlite3 database file?

2019-04-09 Thread Peng Yu
I have some TSV table in .gz format of only 278MB. But the corresponding sqlite3 database exceeds 1.58GB (without any index). Is there a way to make the database file of a size comparable (at least not over 5 times) to the original TSV table in the .gz file? Thanks. -- Regards, Peng

Re: [sqlite] How to use ORDER BY on FTS5 table ?

2019-04-09 Thread Nik Jain
Anybody ? On Mon, Apr 8, 2019 at 9:03 PM Nik Jain wrote: > ok. I investigated further, and it seems my problem is something else > entirely! A SCAN is being performed on a fts5 table. I am not sure but I > think that means no index. > > Query plan: > sqlite> explain query plan select * from

Re: [sqlite] compressed sqlite3 database file?

2019-04-09 Thread Wout Mertens
I know of two options: The proprietary https://sqlite.org/zipvfs/doc/trunk/www/readme.wiki and this extension that you have to call on strings yourself: https://github.com/siara-cc/Shox96_Sqlite_UDF Furthermore, some filesystems allow transparent compression, like ntfs, bcachefs, zfs and btrfs. I

[sqlite] Built in and enabled Virtual Table extensions in SQLite CLI?

2019-04-09 Thread John McMahon
Hi, I have not used extensions before. I understand that some are included in the amalgamation source file and that some of these are enabled by default. So, which ones are built-in and which of those are enabled in the standard downloadable Win32 SQLite CLI? If an extension is built-in and

Re: [sqlite] Option to control implicit casting

2019-04-09 Thread Dominique Devienne
On Tue, Apr 9, 2019 at 5:08 AM Joshua Thomas Wise < joshuathomasw...@gmail.com> wrote: > SQLite3 uses manifest typing, which is great and provides a ton of > flexibility. However, due to implicit casting rules, many operations can > accidentally result in a different value than what was desired.

Re: [sqlite] Option to control implicit casting

2019-04-09 Thread R Smith
On 2019/04/09 5:08 AM, Joshua Thomas Wise wrote: SQLite3 uses manifest typing, which is great and provides a ton of flexibility. However, due to implicit casting rules, many operations can accidentally result in a different value than what was desired. If programmers don’t guard against every

Re: [sqlite] Error in docs

2019-04-09 Thread Dominique Devienne
On Mon, Apr 8, 2019 at 7:58 PM Jim Dossey wrote: > I think I found an error in the documentation here: > https://www.sqlite.org/datatype3.html#column_affinity_for_views_and_subqueries > < > https://www.sqlite.org/datatype3.html#column_affinity_for_views_and_subqueries > > > > It defines the

Re: [sqlite] Error in docs

2019-04-09 Thread Richard Hipp
On 4/9/19, Dominique Devienne wrote: >> >> It defines the table and view: >> CREATE TABLE t1(a INT, b TEXT, c REAL); >> CREATE VIEW v1(x,y,z) AS SELECT b, a+c, 42 FROM t1 WHERE b!=11; >> >> It then states "The affinity of the v1.x column will be the same as the >> affinity of t1.b (INTEGER),

Re: [sqlite] Error in docs

2019-04-09 Thread Dominique Devienne
On Tue, Apr 9, 2019 at 9:41 AM Richard Hipp wrote: > On 4/9/19, Dominique Devienne wrote: > >> > >> It defines the table and view: > >> CREATE TABLE t1(a INT, b TEXT, c REAL); > >> CREATE VIEW v1(x,y,z) AS SELECT b, a+c, 42 FROM t1 WHERE b!=11; > >> > >> It then states "The affinity of the v1.x