[sqlite] sqlite3_column_name() issue with views

2014-02-03 Thread Charles Leifer
I was surprised to find that, depending on whether I queried a table or a view, sqlite3_column_name would return different values for the column name. Specifically, when the table is aliased and the columns in the SELECT clause are quoted, sqlite returns an unquoted, unaliased column name, e.g. " t

Re: [sqlite] sqlite3_column_name() issue with views

2014-02-03 Thread Richard Hipp
On Sun, Feb 2, 2014 at 12:23 PM, Charles Leifer wrote: > I was surprised to find that, depending on whether I queried a table or a > view, sqlite3_column_name would return different values for the column > name. Specifically, when the table is aliased and the columns in the SELECT > clause are qu

Re: [sqlite] sqlite3_column_name() issue with views

2014-02-04 Thread Stephan Beal
On Tue, Feb 4, 2014 at 2:52 AM, Richard Hipp wrote: > There is no "intended" behavior. > http://www.sqlite.org/c3ref/mark/column_name.html?If+there+is+n*fied i assume the broken image at the top of that page qualifies as "unintended behaviour" ;) http://www.sqlite.org/c3ref/images/sqlite370_ba

Re: [sqlite] sqlite3_column_name() issue with views

2014-02-04 Thread Richard Hipp
On Tue, Feb 4, 2014 at 11:34 AM, Stephan Beal wrote: > On Tue, Feb 4, 2014 at 2:52 AM, Richard Hipp wrote: > > > There is no "intended" behavior. > > http://www.sqlite.org/c3ref/mark/column_name.html?If+there+is+n*fied > > > i assume the broken image at the top of that page qualifies as "uninten