Re: [sqlite] Exposing compile-time limits?
> > We do strive to contain unnecessary growth in the number of > interfaces. Remember that we are promising to support every interface > until 2050. That argues for keeping the number of APIs to a minimum. > Sounds good to me. Thanks for clarifying! ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Exposing compile-time limits?
Hello folks, `sqlite3_limit` allows callers to discover the run-time value of limits such as `SQLITE_LIMIT_VARIABLE_NUMBER`. Callers can also *set* each limit, so long as the value is smaller than a compile-time define, in this case `SQLITE_MAX_VARIABLE_NUMBER`. But callers have no good way of determining the largest acceptable value: they must do one of three things. 1. Be compiled at the same time as sqlite3.c and sniff the environment. Obviously this isn't possible for systems that don't control their own SQLite library. 2. Make sure to call `sqlite3_limit` when opening the first database connection, and save the returned value. 3. Discover the acceptable maximum for an existing connection by changing the limit: calling `sqlite3_limit` with a huge value, then calling it again with -1 to fetch the truncated value. (Or calling *three* times to fetch, change, restore.) Is this a deliberate omission? Thanks, -R ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] `SELECT FROM ( subquery ) alias` seems to require `AS`
Hi folks, According to my reading of < https://www.sqlite.org/syntax/table-or-subquery.html>, a table alias for a subquery does not require an AS; that is, SELECT noo.foo FROM ( SELECT … FROM bar ) AS noo is equivalent to SELECT noo.foo FROM ( SELECT … FROM bar ) noo This does not seem to be the case with 3.14.1: SQLite version 3.14.1 2016-08-11 18:53:32 Enter ".help" for usage hints. sqlite> CREATE TABLE bar (e BLOB, a BLOB, v BLOB); sqlite> SELECT DISTINCT inner.uri AS uri FROM ...> (SELECT DISTINCT v AS uri FROM bar) ...> AS inner; sqlite> SELECT DISTINCT inner.uri AS uri FROM ...> (SELECT DISTINCT v AS uri FROM bar) ...> inner; Error: near ";": syntax error Am I misreading the docs, or is this a bug? Thanks, -Richard ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users