mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #23217 from kssenii/default-q
Use double quote identifier in odbc as default in case of error
This commit is contained in:
commit
723c8c10be
@ -19,7 +19,18 @@ namespace ErrorCodes
|
||||
|
||||
std::string getIdentifierQuote(nanodbc::connection & connection)
|
||||
{
|
||||
return connection.get_info<std::string>(SQL_IDENTIFIER_QUOTE_CHAR);
|
||||
std::string quote;
|
||||
try
|
||||
{
|
||||
quote = connection.get_info<std::string>(SQL_IDENTIFIER_QUOTE_CHAR);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
LOG_WARNING(&Poco::Logger::get("ODBCGetIdentifierQuote"), "Cannot fetch identifier quote. Default double quote is used. Reason: {}", getCurrentExceptionMessage(false));
|
||||
return "\"";
|
||||
}
|
||||
|
||||
return quote;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user