26.11.2014 18:52, Mark Rotteveel wrote: > > I initially had a similar implementation (slightly more complex), but I > decided to extend select_expr so the new production reads more like the > production in the SQL standard: > > Compare parse.y: > select_expr > : ... > | with_clause select_expr_body order_clause result_offset_clause > fetch_first_clause > > with SQL:2011: > <query expression> ::= > [<with clause>] <query expression body> > [<order by clause>] [<result offset clause>] [<fetch first clause>] > > Both will work, but I like the elegance of my current solution: it makes > it easier to compare syntax with the SQL spec*. However your suggestion > removes some repetition, and would make it easier to address your second > point. > > What do you want me to do?
Keep your current solution. >> 3) New reserved words (OFFSET and ROW) should be added to the >> keyword_or_column rule to simplify migration. That said, I'm wondering >> why ROWS wasn't added there too in v2.0. Probably my oversight. > > What does this do? Does this allow a keyword to be used as a column name > without quoting it? It allows to rename a column having unlucky (reserved) name. > I was wondering: Do you agree with my introduction and use of > simple_value_spec with result_offset_clause and fetch_first_clause? This > restricts the values to literals (constants), parameters or variables as > in the standard, but it takes away some flexibility (like allowing > expressions, column references etc) as is currently possible with ROWS. Honestly, I don't know. Your solution should cover 99% of all use cases but there may still be some weird misuses. Perhaps we may start with standard-compliant "simple_value_spec" and extend it to full-featured "value" once someone sends a bugreport to the tracker ;-) Dmitry ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
