Re: [sqlite] pragmas in subselects?

2014-01-29 Thread big stone
Would the implementation of a subset of Information schema also allow the Alter table function to work in more (SQL) standard situations ? (killing two birds with one stone) http://en.wikipedia.org/wiki/Information_schema ___ sqlite-users mailing list

Re: [sqlite] pragmas in subselects?

2014-01-29 Thread Petite Abeille
On Jan 29, 2014, at 9:58 PM, big stone stonebi...@gmail.com wrote: (killing two birds with one stone) No. One bird only. Enhancing ‘alter table’ is another kettle of fish altogether. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] pragmas in subselects?

2014-01-27 Thread Clemens Ladisch
big stone wrote: There is a non-logicality of having pragma table_info(my_table) : - answering like a select, - but being not usable as a select, nor queriable by a select. SQLite's PRAGMA implementations do not plug into the internal query mechanism used by SELECT, but hardcode a VDBE program

Re: [sqlite] pragmas in subselects?

2014-01-27 Thread Stephan Beal
On Sun, Jan 26, 2014 at 9:45 PM, Jay Kreibich j...@kreibi.ch wrote: Chapter 10 of Using SQLite covers virtual tables. One of the examples given shows how to wrap a PRAGMA statement, so it can be used as system catalog and used in normal SELECT statements. It would be pretty easy to expand

[sqlite] pragmas in subselects?

2014-01-26 Thread Stephan Beal
Hi, all, is there a syntactical construct which will allow me to use a pragma in a subselect? e.g. i'm trying to do... sqlite pragma table_info(vfile); cid|name|type|notnull|dflt_value|pk 0|id|INTEGER|0||1 1|vid|INTEGER|0||0 ... sqlite select name from (pragma table_info(vfile)); Error: near (:

Re: [sqlite] pragmas in subselects?

2014-01-26 Thread Petite Abeille
On Jan 26, 2014, at 5:09 PM, Stephan Beal sgb...@googlemail.com wrote: Is this possible? Sadly, no. Much of a PITA. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] pragmas in subselects?

2014-01-26 Thread Luuk
On 26-01-2014 17:09, Stephan Beal wrote: Hi, all, is there a syntactical construct which will allow me to use a pragma in a subselect? e.g. i'm trying to do... sqlite pragma table_info(vfile); cid|name|type|notnull|dflt_value|pk 0|id|INTEGER|0||1 1|vid|INTEGER|0||0 ... sqlite select name from

Re: [sqlite] pragmas in subselects?

2014-01-26 Thread Jay Kreibich
Chapter 10 of Using SQLite covers virtual tables. One of the examples given shows how to wrap a PRAGMA statement, so it can be used as system catalog and used in normal SELECT statements. It would be pretty easy to expand the given example to cover almost any SQL statement (including any

Re: [sqlite] pragmas in subselects?

2014-01-26 Thread big stone
There is a non-logicality of having pragma table_info(my_table) : - answering like a select, - but being not usable as a select, nor queriable by a select. Other databases seem more logical on this practical matter. Multi-motor tools, like dbeaver, have currently much less good support of

Re: [sqlite] pragmas in subselects?

2014-01-26 Thread Petite Abeille
On Jan 26, 2014, at 11:19 PM, big stone stonebi...@gmail.com wrote: == Is it the reason ? Well, that pragmas are not directly queryable from SQL just add insult to injury. What SQLite would really benefit from is a proper, consistent, queryable data dictionary such as the the standard

Re: [sqlite] pragmas in subselects?

2014-01-26 Thread Simon Slavin
On 26 Jan 2014, at 10:32pm, Petite Abeille petite.abei...@gmail.com wrote: What SQLite would really benefit from is a proper, consistent, queryable data dictionary such as the the standard information schema: http://en.wikipedia.org/wiki/Information_schema I would like that for in