Added support for identifiers in double quotes [#CLICKHOUSE-20].

This commit is contained in:
Alexey Milovidov 2017-06-24 04:49:15 +03:00
parent b333c6b47a
commit 30b6c36b83
3 changed files with 9 additions and 3 deletions

View File

@ -137,12 +137,16 @@ bool ParserIdentifier::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_pa
{
Pos begin = pos;
/// Identifier in backquotes
if (pos != end && *pos == '`')
/// Identifier in backquotes or in double quotes
if (pos != end && (*pos == '`' || *pos == '"'))
{
ReadBufferFromMemory buf(pos, end - pos);
String s;
readBackQuotedString(s, buf);
if (*pos == '`')
readBackQuotedString(s, buf);
else
readDoubleQuotedString(s, buf);
if (s.empty()) /// Identifiers "empty string" are not allowed.
return false;

View File

@ -0,0 +1 @@
SELECT "numbers"."number" FROM "system"."numbers" LIMIT 1;