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

2020-02-07 Thread Simon Slavin
On 8 Feb 2020, at 4:05am, Keith Medcalf wrote: > filename=FILENAME is the csv filename in quotes. Please mention in documentation whether full or partial paths can be included. > header=BOOL will "parse" the first row to get the column names unless a > SCHEMA is specified. Looks good

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

2020-02-07 Thread Keith Medcalf
I don't think that patch to apply affinities is a good idea since it will usually be mostly useless and will negatively impact performance since one can and should assume that the actual author of the VTable knows what they are doing, currently SQLite3 does not enforce declared VTable column

Re: [sqlite] loading extension csv.c

2020-02-07 Thread Richard Damon
On 2/7/20 3:14 PM, Jens Alfke wrote: On Feb 7, 2020, at 9:11 AM, chiahui chen wrote: /usr/include/sqlite3ext.h:437:53: note: expanded from macro 'sqlite3_vsnprintf' #define sqlite3_vsnprintf sqlite3_api->vsnprintf ~~~ ^

Re: [sqlite] UPSERT documentation question

2020-02-07 Thread nomad
I should perhaps point out that the issue has been solved - the page has been adjusted. Thanks devs. -- Mark Lawrence ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] UPSERT documentation question

2020-02-07 Thread nomad
On Fri Feb 07, 2020 at 01:45:53PM +, David Raymond wrote: > > CREATE TABLE vocabulary(word TEXT PRIMARY KEY, count INT DEFAULT > > 1); INSERT INTO vocabulary(word) VALUES('jovial') ON CONFLICT(word) > > DO UPDATE SET count=count+1; > > > > Shouldn't that actually be written as

Re: [sqlite] loading extension csv.c

2020-02-07 Thread Jens Alfke
> On Feb 7, 2020, at 9:11 AM, chiahui chen wrote: > > /usr/include/sqlite3ext.h:437:53: note: expanded from macro > 'sqlite3_vsnprintf' > > #define sqlite3_vsnprintf sqlite3_api->vsnprintf > > ~~~ ^ > >

Re: [sqlite] notify all processes of database modification

2020-02-07 Thread Jens Alfke
> On Feb 7, 2020, at 6:23 AM, Kees Nuyt wrote: > > Anyway, SQLite doesn't have such a mechanism by itself. > Maybe inotify is useful to you : > > https://en.wikipedia.org/wiki/Inotify > http://man7.org/linux/man-pages/man7/inotify.7.html >

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

2020-02-07 Thread Jens Alfke
> On Feb 5, 2020, at 6:56 PM, Keith Medcalf wrote: > >> It probably doesn’t parse that declaration or >> figure out from it what the declared types of the columns are. > > Actually it does, and this is documented for the sqlite3_declare_vtab > function -- and in fact the column names and

[sqlite] case-insensitivity of keywords are hardly documented

2020-02-07 Thread Aapo Rantalainen
Hi, I'm just doing some 'software archeology' and I found that: on Nov 21 01:02:00 2004 FossilOrigin-Name: ac72a1d5518f7b505ae2a1bd3be3d71db461ae7e git: f8565825622a1ed48bdaa835968a1137b2ffa593 This sentence have been dropped out of documentation: "Keyword matching in SQLite is case-insensitive."

Re: [sqlite] loading extension csv.c

2020-02-07 Thread chiahui chen
Hi Dr. Hipp, Thank you very much. I tried the suggested solution. sqlite3 was downloaded and compiled. Then ran : gcc -g -l. -fPIC -dynamiclib ./ext/csv.c -o csv.dylib the same errors occurred again. ./ext/csv.c:115:3: error: no member named '__builtin___vsnprintf_chk' in 'struct

Re: [sqlite] Please increase the default for SQLITE_MAX_VARIABLE_NUMBER

2020-02-07 Thread Alex Bronstein
Thanks, everyone, for your responses on Tuesday. I wasn't on the mailing list, so didn't receive them in my email, but I am now, and I can see the responses on https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg118979.html. Much appreciated! > Can you show us some place where

Re: [sqlite] loading extension csv.c

2020-02-07 Thread Rolf Ade
> On 2/7/20, chiahui chen wrote: >> >> I tried the suggested solution. sqlite3 was >> downloaded and compiled. >> Then ran : gcc -g -l. -fPIC -dynamiclib ./ext/csv.c -o csv.dylib ^^^ Is this a typo? This should read gcc -I. >> the same errors occurred again.

Re: [sqlite] loading extension csv.c

2020-02-07 Thread Richard Hipp
On 2/7/20, chiahui chen wrote: > > I tried the suggested solution. sqlite3 was > downloaded and compiled. > Then ran : gcc -g -l. -fPIC -dynamiclib ./ext/csv.c -o csv.dylib > the same errors occurred again. > > Is there any suggestion? Just in case if my Mac operating system provides > some info

Re: [sqlite] notify all processes of database modification

2020-02-07 Thread Kees Nuyt
On Fri, 7 Feb 2020 00:13:00 -0700 (MST), you wrote: > The documents are no longer available, can you kindly share it to my mail. > I'll be extremely thankful to you. Mail is aliahmadqureshi...@gmail.com You are probably following up a posting of about 10 years ago. Most of us do not have that

Re: [sqlite] UPSERT documentation question

2020-02-07 Thread David Raymond
> CREATE TABLE vocabulary(word TEXT PRIMARY KEY, count INT DEFAULT 1); > INSERT INTO vocabulary(word) VALUES('jovial') > ON CONFLICT(word) DO UPDATE SET count=count+1; > > Shouldn't that actually be written as "vocabulary.count+1"? Nope. Unqualified names there refer to the one and only record

Re: [sqlite] notify all processes of database modification

2020-02-07 Thread Ali Ahmad Qureshi
The documents are no longer available, can you kindly share it to my mail. I'll be extremely thankful to you. Mail is aliahmadqureshi...@gmail.com -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list

Re: [sqlite] Performance problem with DELETE FROM/correlated subqueries

2020-02-07 Thread Jürgen Baier
Hi, On 07.02.20 09:25, Clemens Ladisch wrote: Jürgen Baier wrote: CREATE TABLE main ( ATT1 INT, ATT2 INT, PRIMARY KEY (ATT1,ATT2) ); CREATE TABLE staging ( ATT1 INT, ATT2 INT ); Then I execute DELETE FROM main WHERE EXISTS (SELECT 1 FROM staging WHERE main.att1 = staging.att1 AND

Re: [sqlite] Performance problem with DELETE FROM/correlated subqueries

2020-02-07 Thread Rowan Worth
On Fri, 7 Feb 2020 at 16:25, Clemens Ladisch wrote: > Jürgen Baier wrote: > > CREATE TABLE main ( ATT1 INT, ATT2 INT, PRIMARY KEY (ATT1,ATT2) ); > > CREATE TABLE staging ( ATT1 INT, ATT2 INT ); > > > > Then I execute > > > > DELETE FROM main WHERE EXISTS (SELECT 1 FROM staging WHERE

Re: [sqlite] Performance problem with DELETE FROM/correlated subqueries

2020-02-07 Thread Clemens Ladisch
Jürgen Baier wrote: > CREATE TABLE main ( ATT1 INT, ATT2 INT, PRIMARY KEY (ATT1,ATT2) ); > CREATE TABLE staging ( ATT1 INT, ATT2 INT ); > > Then I execute > > DELETE FROM main WHERE EXISTS (SELECT 1 FROM staging WHERE main.att1 = > staging.att1 AND main.att2 = staging.att2) > > which takes

[sqlite] Performance problem with DELETE FROM/correlated subqueries

2020-02-07 Thread Jürgen Baier
Hi, I have a question regarding the performance of DELETE FROM (or maybe better: correlated subqueries). I have a table "main" and a table "staging". In "staging" I have a subset of "main". I want to delete all rows from "main" which are also in "staging".   CREATE TABLE main ( ATT1 INT,