Merge pull request #27702 from ClickHouse/vitlibar-backquote-default-database-in-create-user

Backquote default database in CREATE USER
This commit is contained in:
alexey-milovidov 2021-08-16 02:47:34 +03:00 committed by GitHub
commit a2bc6f3714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,5 @@
#include <Parsers/ASTDatabaseOrNone.h>
#include <Common/quoteString.h>
#include <IO/Operators.h>
namespace DB
@ -10,7 +11,7 @@ void ASTDatabaseOrNone::formatImpl(const FormatSettings & settings, FormatState
settings.ostr << (settings.hilite ? IAST::hilite_keyword : "") << "NONE" << (settings.hilite ? IAST::hilite_none : "");
return;
}
settings.ostr << database_name;
settings.ostr << backQuoteIfNeed(database_name);
}
}