On Fri, Nov 11, 2011 at 02:24:54PM +0100, Jean-Christophe Deschamps scratched 
on the wall:

> >Is this a bug or a query statement inaccuracy on my part?
> 
> Looks like a documentation bug.  Indeed the select-core diagram
> incorrectly shows an ordering-term in the GROUP BY clause.  It
> should probably be named grouping-term instead, with grouping-term
> being defined as a comma-separated list of column expressions.

  Yes and no.  The "railroad" diagrams are not definitive, and are meant 
  more as an illustrative guideline, then a strict grammar.  They do
  not directly reflect the actual parse tree used by the SQLite parser.

  Further, while the diagrams try to represent what the parser will
  accept, that may or may not (as in this case) be a logical SQL
  statement.  Not all of the statement validation is done at the
  parsing level.


  As someone that's gone through and modified almost every diagram for
  republishing, I can assure you that if you start to dig into things,
  it is not difficult to find instances where you can use the diagrams
  to create statements that make no logical sense, and are not accepted
  by SQLite.  The diagrams alone cannot keep you from avoiding errors
  if you do not know the language and how it works.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to