> On Feb 5, 2020, at 6:56 PM, Keith Medcalf <kmedc...@dessus.com> 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 affinities are parsed and stored 
> in the internal Table schema.  

Sorry, I meant that the _CSV extension_ doesn't parse the 'CREATE TABLE…' 
declaration to figure out what column affinities the caller desires.

SQLite probably stores the column affinities so they can be returned from APIs 
that request them; IIRC isn't there a C API call that tells you the affinity of 
a column?

> The column names are used but the executed VDBE program does not "apply 
> affinity".

I suspect this is for the same reason that led to the immediate objections to 
your proposal: it could hurt performance.

I think your proposal makes sense given that it doesn't slow anything down if 
the extension didn't specify any column affinities. My virtual table doesn't.

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to