dynamobi/dynamobi — Issue #374: [FRG-399] Should allow string literals, broken by comments, on the same line
Author: dynamobi-build
Created: 2011-12-30 03:11:24+00:00
State: open
Labels: FRG, SQL Validator

[reporter="jhyde", created="Thu, 27 May 2010 17:58:15 -0500 (GMT-05:00)"]
Farrago should allow string literals, broken by comments, on the same line. See discussion at http://rpbouman.blogspot.com/2010/05/small-issue-of-sql-standards.html

Current behavior:

-- ON ONE SINGLE LINE

SELECT 'a' /* this is a comment */ 'b' from onerow;

Error: From line 1, column 37 to line 1, column 39: String literal continued on same line (state=,code=0)

-- ON TWO LINES

SELECT 'a' /* this is a comment */

'b' from BENCH100;

+---------+

| EXPR$0 |

+---------+

| ab |

+---------+

We justified the behavior of the first statement because of ISO/IEC 9075-2:2003 (E) 5.3.4:

"In a , , , or , a shall contain a ."

But we missed 5.3, 12) of Syntax rules:

11) SQL text containing one or more instances of is equivalent to the same SQL text with the

replaced with .

So, every comment is a newline, and "ON ONE SINGLE LINE" should be valid.