Re: [sqlite] [EXTERNAL] Re: Patch: VTable Column Affinity Question and Change Request

2020-02-06 Thread Hick Gunter
>Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im >Auftrag von Dominique Devienne > >On Thu, Feb 6, 2020 at 9:32 AM Hick Gunter wrote: >> >Of course, it may be that the writer of the VTable should know what they >> >are doing and generate a VTable definition that is

Re: [sqlite] Does a foreign key field need a separate index?

2020-02-06 Thread Dominique Devienne
On Thu, Feb 6, 2020 at 11:08 PM Simon Slavin wrote: > On 6 Feb 2020, at 9:23pm, Rael Bauer wrote: > > Is a foreign key field automatically indexed, or will it benefit from a > > separately created index? > No indexes for either lookup are automatically created. The shell's .expert command

Re: [sqlite] wrong number of arguments to function rank()

2020-02-06 Thread Andrea Spacca
> Looks like there should be one argument after the "matchinfo" for each > column in the table. So: > SELECT rank(matchinfo(event_search_test), 1.0, 1.0) AS rank, > room_id... Yes, I realised that nVal is the number of arguments passed to the function, so according to nVal!=(1+nCol) I have

[sqlite] UPSERT documentation question

2020-02-06 Thread nomad
The page https://sqlite.org/lang_UPSERT.html includes the following text: Some examples will help illustrate the difference: CREATE TABLE vocabulary(word TEXT PRIMARY KEY, count INT DEFAULT 1); INSERT INTO vocabulary(word) VALUES('jovial') ON CONFLICT(word) DO

Re: [sqlite] Does a foreign key field need a separate index?

2020-02-06 Thread Simon Slavin
On 6 Feb 2020, at 9:23pm, Rael Bauer wrote: > Is a foreign key field automatically indexed, or will it benefit from a > separately created index? No indexes for either lookup are automatically created. You should create indexes which will help lookup in both directions, unless one of the

[sqlite] Does a foreign key field need a separate index?

2020-02-06 Thread Rael Bauer
Hi, Is a foreign key field automatically indexed, or will it benefit from a separately created index? E.g. CREATE TABLE [content](   [note_id] INTEGER REFERENCES [notes]([id]) ON DELETE CASCADE,   [data] BLOB); Will note_id benefit from a separately created index? Thanks Rael

[sqlite] Remarks/questions about SQLITE_OMIT_LOOKASIDE & SQLITE_OMIT_TWOSIZE_LOOKASIDE

2020-02-06 Thread Dominique Pellé
Hi Here are a few remarks and questions about SQLITE_OMIT_LOOKASIDE and SQLITE_OMIT_TWOSIZE_LOOKASIDE: 1) SQLite has SQLITE_OMIT_LOOKASIDE to disable lookaside memory completely at compilation time. However, I see that some of the lookaside code is not disabled by SQLITE_OMIT_LOOKASIDE. For

Re: [sqlite] [EXTERNAL] Re: Patch: VTable Column Affinity Question and Change Request

2020-02-06 Thread Hick Gunter
Unfortunately no, since the code is all proprietary and includes extensive generated code. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Nelson, Erik - 2 Gesendet: Donnerstag, 6. Februar 2020 14:57 An: SQLite mailing

Re: [sqlite] loading extension csv.c

2020-02-06 Thread Richard Hipp
On 2/6/20, chiahui chen wrote: > Hi, > > After few attempts to load csv extension, (already tried > > gcc -arch x86_64 -g -fPIC -dynamiclib csv.c -o csv.dylib > > and > > gcc -g -fPIC -dynamiclib csv.c -o csv.dylib > ) > Mac terminal returns errors as followings: I don't know what is

[sqlite] loading extension csv.c

2020-02-06 Thread chiahui chen
Hi, After few attempts to load csv extension, (already tried gcc -arch x86_64 -g -fPIC -dynamiclib csv.c -o csv.dylib and gcc -g -fPIC -dynamiclib csv.c -o csv.dylib ) Mac terminal returns errors as followings: csv.c:115:3: error: no member named '__builtin___vsnprintf_chk' in

Re: [sqlite] [EXTERNAL] Re: Patch: VTable Column Affinity Question and Change Request

2020-02-06 Thread Nelson, Erik - 2
Hick Gunter wrote on Thursday, February 6, 2020 3:32 AM >We are almost exclusively using virtual tables to allow queries against our >internal data sources, >which are C language structs and thus strictly typed. The column affinities >provided by the VTab >implementations are used for

Re: [sqlite] wrong number of arguments to function rank()

2020-02-06 Thread Dan Kennedy
On 6/2/63 19:00, Andrea Spacca wrote: Hello, I experienced seeing no results for search in matrix-syanpse backed by sqlite3 storage. Tracking down the their source code I identified the query: https://github.com/matrix-org/synapse/blob/v1.9.1/synapse/storage/data_stores/main/search.py#L424

Re: [sqlite] Double return Issue in sqlite3_filename_database

2020-02-06 Thread Richard Hipp
On 2/6/20, Damian Wilson wrote: > > Probably benign, but nice if it was cleaned up. > Correct. It is benign - identical machine code is generated with and without the extra statement. And, curiously, the problem was not detected by GCC even with -Wall -Wextra -pedantic-errors. Thanks for

[sqlite] Double return Issue in sqlite3_filename_database

2020-02-06 Thread Damian Wilson
Hi folks Firstly, apologies if this should go to the -dev user list, but I had to start somewhere. I noticed the following double return issue in 3.31.1 source code: Main.c: const char *sqlite3_filename_database(const char *zFilename){ return databaseName(zFilename); return

[sqlite] wrong number of arguments to function rank()

2020-02-06 Thread Andrea Spacca
Hello, I experienced seeing no results for search in matrix-syanpse backed by sqlite3 storage. Tracking down the their source code I identified the query: https://github.com/matrix-org/synapse/blob/v1.9.1/synapse/storage/data_stores/main/search.py#L424 I then run the query directly on a

Re: [sqlite] [EXTERNAL] Re: Patch: VTable Column Affinity Question and Change Request

2020-02-06 Thread Dominique Devienne
On Thu, Feb 6, 2020 at 9:32 AM Hick Gunter wrote: > >Of course, it may be that the writer of the VTable should know what they are > >doing and generate a VTable definition that is consistent with how their > >cursor methods return data, however ... this will omit the OP_Affinity if no >

Re: [sqlite] [EXTERNAL] Re: Patch: VTable Column Affinity Question and Change Request

2020-02-06 Thread Hick Gunter
>Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im >Auftrag von Keith Medcalf >Betreff: [EXTERNAL] Re: [sqlite] Patch: VTable Column Affinity Question and >Change Request > > >Patch to Fix Column Affinity not applied to Virtual Columns. > >In expr.c function