mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Added support for identifiers in double quotes [#CLICKHOUSE-20].
This commit is contained in:
parent
b333c6b47a
commit
30b6c36b83
@ -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;
|
||||
|
@ -0,0 +1 @@
|
||||
0
|
@ -0,0 +1 @@
|
||||
SELECT "numbers"."number" FROM "system"."numbers" LIMIT 1;
|
Loading…
Reference in New Issue
Block a user