Re: [DOCS] Lexical Structure - String Constants

2014-06-17 Thread Sérgio Saquetim
> "10e" is not a valid number, just like the manual says. But "10" is a > valid number, and "e" is a valid column alias, so this is equivalent > to "SELECT 10 AS e". There's no requirement for white space between > adjacent tokens, if the tokens couldn't validly be run together into > one token.

Re: [DOCS] Lexical Structure - String Constants

2014-06-16 Thread Tom Lane
=?UTF-8?Q?S=C3=A9rgio_Saquetim?= writes: > 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? Hm, interesting. It looks to me like modern versions of the SQL spec require

[DOCS] Lexical Structure - String Constants

2014-06-16 Thread Sérgio Saquetim
Hi, I'm trying to build in Java a SQL lexer/parser, compliant with PostgreSQL 9.3, from scratch as a hobby project and reading chapter 4, section 4.1 ( http://www.postgresql.org/docs/9.3/interactive/sql-syntax-lexical.html) and I've noticed a few things I thought I should mention: In section 4.1.