On Sun, 13 Jul 2014 22:54:52 +0100
Simon Slavin <slav...@bigfraud.org> wrote:

> > sqlite> select "TestView"."id", "TestView"."data2" from TestView;
> > TestView    TestView
> > ----------  ----------
> > 1           Miranda
...
> It's also not 'wrong' with regard to the SQL specification.  SQL does
> not define any commands which retrieve the column names of a table,
> or the column names of the result of a SELECT, so it doesn't define
> anything about the names produced.

Maybe it's not a bug, but it's not a feature, either, wouldn't you
agree?  Of the choices available, using only the view name as a column
name is unhelpful. Significantly the OP states the particular
circumstances:

> does not occur when selecting from a table, 
> nor does it occur when the quotes are omitted. 

The "no contract" defense is a damp refuge next to utility and
consistency.  Views should behave like tables, and quoting shouldn't
affect how columns are labelled.  

> Also, a note about delimited identifiers.  SQLite supports them
> correctly.  Almost nobody does these days, 

While I'm sure you've encountered noncompliant implementations, I don't
think it's accurate to say most don't SQL DBMSs don't support SQL-92
quoting.  I know a few that do, and no commercial ones that don't.  

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

Reply via email to