Re: [sqlite] Option to control implicit casting

2019-04-10 Thread Joshua Thomas Wise
corruption very seriously, could provide some guarantees about the precision of answers given for basic arithmetic. > On Apr 10, 2019, at 10:55 AM, Keith Medcalf wrote: > > > On Wednesday, 10 April, 2019 08:28, Joshua Thomas Wise > mailto:joshuathomasw...@gm

Re: [sqlite] Option to control implicit casting

2019-04-10 Thread Joshua Thomas Wise
g its type won’t help either, because it does indeed return an integer. > On Apr 9, 2019, at 2:06 PM, James K. Lowden wrote: > > 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 >> i

[sqlite] Option to control implicit casting

2019-04-08 Thread Joshua Thomas Wise
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 possible cause of implicit casting, many error

Re: [sqlite] ANN: SQLite3 Decimal Extension

2019-04-03 Thread Joshua Thomas Wise
> [Here, I must thank Dr. Hipp, with whom I had a brief email exchange > severals moons ago, who convinced me that the IEEE 754 encoding was not > an ideal storage format for databases] I’m curious, what were the reasons behind Dr. Hipp’s opinion on this? > On Apr 3, 2019, at 1:56 PM, Simon

Re: [sqlite] Feature request: dynamically referenced bind parameters

2019-03-28 Thread Joshua Thomas Wise
Oooo this is really neat. Thanks! > On Mar 27, 2019, at 5:12 PM, Richard Hipp wrote: > > See https://www.sqlite.org/carray.html > > -- > D. Richard Hipp > d...@sqlite.org > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org >

[sqlite] Feature request: dynamically referenced bind parameters

2019-03-27 Thread Joshua Thomas Wise
I’ve commonly encountered cases where I have a many-to-many relationship, and I would like to retrieve those relationships in a single query. For example: CREATE TABLE staff ( email TEXT PRIMARY KEY, name TEXT ); CREATE TABLE articles ( id INTEGER PRIMARY KEY, title TEXT, body TEXT,

Re: [sqlite] sqlite3_db_filename returns an empty string when null pointer is promised

2019-03-18 Thread Joshua Thomas Wise
I recently ran into this as well. NULL is not the same as “”, and it took me a really long time of debugging before I realized it was the sqlite3 documentation at fault. > On Mar 13, 2019, at 6:03 PM, Alex Alabuzhev wrote: > > Hi, > > https://www.sqlite.org/c3ref/db_filename.html: > >> If

Re: [sqlite] Recursive CTE on tree with doubly linked items

2019-03-18 Thread Joshua Thomas Wise
Another way of implementing ordered siblings is to use a floating point “position” column instead of maintaining links to siblings via foreign keys. The advantage of a “position” column is that the data model maintains consistency automatically—you don’t need to painstakingly make sure all

Re: [sqlite] [EXTERNAL] Re: Missing docs

2019-03-15 Thread Joshua Thomas Wise
gt; Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im > Auftrag von Joshua Thomas Wise > Gesendet: Freitag, 15. März 2019 18:26 > An: SQLite mailing list > Betreff: [EXTERNAL] Re: [sqlite] Missing docs > > Yes sorry, it was a erroneous co

Re: [sqlite] Missing docs

2019-03-15 Thread Joshua Thomas Wise
ct that there's a Highway to Hell but only a Stairway to Heaven says a > lot about anticipated traffic volume. > >> -Original Message- >> From: sqlite-users [mailto:sqlite-users- >> boun...@mailinglists.sqlite.org] On Behalf Of Joshua Thomas Wise >> Sent: Thurs

[sqlite] Missing docs

2019-03-14 Thread Joshua Thomas Wise
Nowhere in the current documentation does it mention the existence of the SQLITE_ENABLE_NORMALIZE compile-time option, and nowhere does it mention that sqldark_source_normalized() requires that option to be present. The docs should probably mention this. - Josh

Re: [sqlite] missing SQLITE_DEFAULT_TEMP_CACHE_SIZE

2019-03-14 Thread Joshua Thomas Wise
On Mar 10, 2019, at 1:33 PM, Joshua Thomas Wise wrote: Hello, The documentation here <https://www.sqlite.org/tempfiles.html#other_temporary_file_optimizations> (https://www.sqlite.org/tempfiles.html#other_temporary_file_optimizations <https://www.sqlite.org/tempf

[sqlite] missing SQLITE_DEFAULT_TEMP_CACHE_SIZE

2019-03-10 Thread Joshua Thomas Wise
Hello, The documentation here (https://www.sqlite.org/tempfiles.html#other_temporary_file_optimizations ) mentions that temporary tables and

Re: [sqlite] Documentation is lying to me

2019-02-27 Thread Joshua Thomas Wise
iling list >> Subject: Re: [sqlite] Documentation is lying to me >> >> I can confirm that it also doesn’t work with SQLite version 3.24.0 on a >> completely different machine. >> >>> On Feb 27, 2019, at 9:23 AM, Joshua Thomas Wise >> <mailto:joshuathom

Re: [sqlite] Documentation is lying to me

2019-02-27 Thread Joshua Thomas Wise
pragma_database_list(); > > > --- > The fact that there's a Highway to Hell but only a Stairway to Heaven says a > lot about anticipated traffic volume. > >> -Original Message- >> From: sqlite-users [mailto:sqlite-users- >> boun...@mailinglists.sqlite.org]

[sqlite] Documentation is lying to me

2019-02-26 Thread Joshua Thomas Wise
In this SQLite3 documentation (https://www.sqlite.org/pragma.html#pragfunc), it says that information_schema could be implemented by doing something like this: ATTACH ':memory:' AS 'information_schema'; CREATE VIEW information_schema.schemata(schema_name) AS SELECT name FROM

Re: [sqlite] Inconsistent behavior in sqlite3_set_authorizer() and error messages

2019-02-09 Thread Joshua Thomas Wise
I’ll interpret the silence as a “no”? > On Feb 7, 2019, at 11:53 AM, Joshua Thomas Wise > wrote: > > Is the SQLite team aware of these issues? > > >> On Feb 4, 2019, at 7:00 AM, sqlite-users-requ...@mailinglists.sqlite.org >> <mailto:sqlite-users-requ.

Re: [sqlite] Inconsistent behavior in sqlite3_set_authorizer() and error messages

2019-02-07 Thread Joshua Thomas Wise
Is the SQLite team aware of these issues? > On Feb 4, 2019, at 7:00 AM, sqlite-users-requ...@mailinglists.sqlite.org > wrote: > > Hello, > > I found some behaviors that should probably be considered bugs (and should be > fixed and/or documented). > > Let’s start the explanation by observing

Re: [sqlite] Inconsistent behavior in sqlite3_set_authorizer() and error messages

2019-02-04 Thread Joshua Thomas Wise
> On Feb 4, 2019, at 7:00 AM, sqlite-users-requ...@mailinglists.sqlite.org > wrote: > > For the last point, using the SQLITE_OMIT_TEMPDB option, did you compile from > the amalgamation or the full cannonical sources? According to > https://www.sqlite.org/compile.html#_options_to_omit_features

[sqlite] Inconsistent behavior in sqlite3_set_authorizer() and error messages

2019-02-03 Thread Joshua Thomas Wise
Hello, I found some behaviors that should probably be considered bugs (and should be fixed and/or documented). Let’s start the explanation by observing some behavior that actually is correct and consistent. Below, we observe which type of action is reported by sqlite3_set_authorizer(), given