Re: [sqlite] Possible bug when creating a calculated index

2017-01-26 Thread Simon Slavin
On 26 Jan 2017, at 11:33pm, Ersin Akinci wrote: > (Please someone correct me if I'm wrong here. I'm a SQLite n00b who > managed to stumble onto a subtle problem while debugging Rails. =) Nope, you got it right. And Michael has too. I took your original report and

Re: [sqlite] Possible bug when creating a calculated index

2017-01-26 Thread Michael Falconer
Thank you Simon, I do see the inconsistency and thanks for those examples. I had answered previously before I saw your explanation and I now see why there is concern. It certainly appears to be inconsistent given such use cases. On 27 January 2017 at 10:26, Michael Falconer

Re: [sqlite] Possible bug when creating a calculated index

2017-01-26 Thread Ersin Akinci
Michael, I think part of the problem is that the "obviously" (or 'obviously', ha) useful behavior here would be for single quoted arguments to result in column interpretation. You're quite right to say that you want to be told that your column doesn't exist--that is very helpful information!. But

Re: [sqlite] Possible bug when creating a calculated index

2017-01-26 Thread Michael Falconer
Ersin, apologies if I seem to be suffering from terminal thickness, but I still don't get it. Why would I expect anything other than column interpretation from a single quoted argument. I *want to be told* that my column does not exist, I don't want a calculated index so why should I be expecting

Re: [sqlite] Possible bug when creating a calculated index

2017-01-26 Thread Simon Slavin
On 26 Jan 2017, at 10:56pm, Michael Falconer wrote: > as I see it there is no problem here. Explicit quoting regardless, the > column does not exist and an error is returned, isn't this the expected > outcome? Yet it’s not consistent. I should have given more

Re: [sqlite] Possible bug when creating a calculated index

2017-01-26 Thread Ersin Akinci
Michael, If I understood DRH and Simon correctly, I think the cause for concern is that SQLite should be interpreting the single quotes as a string literal, yet it interprets it as a column. Perhaps it's a strange example (i.e., why would you want to index a string literal?), but still, the

Re: [sqlite] Possible bug when creating a calculated index

2017-01-26 Thread Michael Falconer
Simon, as I see it there is no problem here. Explicit quoting regardless, the column does not exist and an error is returned, isn't this the expected outcome? In the DRH quoted section a reason is presented as to why no error is returned due to a built in default action. This may or may not be a

Re: [sqlite] Possible bug when creating a calculated index

2017-01-26 Thread Simon Slavin
On 25 Jan 2017, at 12:50pm, Simon Slavin wrote: > Bug is as follows: Anyone ? Did I miss something and you’re all too polite to point it out ? Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] Possible bug when creating a calculated index

2017-01-25 Thread Simon Slavin
Bug is as follows: SQLite version 3.14.0 2016-07-26 15:17:14 Enter ".help" for usage hints. sqlite> CREATE TABLE reports (a INT, b TEXT); sqlite> CREATE INDEX index_reports_quotes ON reports ("yearz_doesnt_exist"); sqlite> PRAGMA index_xinfo('index_reports_quotes'); 0|-2||0|BINARY|1