Hi,
In section 4.1.2.1, the following text introduces us to SQL's bizarre multiline/multisegment split style: "Two string constants that are only separated by whitespace with at least one newline are concatenated and effectively treated as if the string had been written as one constant."
The text does not mention if comments are allowed between segments, so I've run a few tests on PSQL (PostgreSQL 9.3.4):
version
------------------------------------------------------------------------------------------------------
PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-16ubuntu6) 4.8.2, 64-bit
(1 row)
postgres=# SELECT 'a'
'b';
?column?
----------
ab
(1 row)
postgres=# SELECT 'a' --comment
'b';
?column?
----------
ab
(1 row)
So far everything worked, but I've got different results with C style block comments:
postgres=# SELECT 'a' /*comment*/
'b';
ERROR: syntax error at or near "'b'"
LINE 2: 'b';
So line style comments (--) are accepted between segments but not C style block comments (/* */). Do you think this difference in behavior should me mentioned in the docs?
I've also noticed that in section 4.1.2.6, the following statement: "At least one digit must follow the exponent marker (e), if one is present."
As I've understood the statement, I think it says that the following instruction should not be valid because the exponent marker is not followed by at least one digit, but the expression is successfully evaluated:
postgres=# SELECT 10e;
e
----
10
(1 row)
That said, I live in Brazil and English is not my first language so I may be mistaken, but I thought I should bring this to this list.
Regards,
Sérgio Saquetim