On Sun, 26 Jan 2020 12:01:32 -0700
"Keith Medcalf" <kmedc...@dessus.com> wrote:

> Now that the table exists, use "SELECT * FROM <table>" to determine
> the number of columns in the table (which will include computed
> always columns, if any).
...
> Otherwise, Richard *may* make some changes to the .import logic which
> *might* appear in the next release version.  

I imagine it's already being considered: if pragma table_info included
a column with the SQL for generated columns (and NULL) otherwise, the
shell could use that instead of SELECT * to determine the number of
insertable columns.  

I'm a little confused, though.  ISTR the shell does something clever
with .import, because constraints that enforce numeric types are
violated even when the data are numeric.  Is that simply because the
shell uses sqlite3_bind_text for every column, and the system doesn't
attempt to convert numeric text to a numeric type, regardless of the
column's declared type?  

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

Reply via email to