mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Fix inconsistent formatting of INSERT queries
This commit is contained in:
parent
6b32622c7d
commit
69dfd721ce
@ -91,7 +91,8 @@ static inline void writeProbablyQuotedStringImpl(StringRef s, WriteBuffer & buf,
|
||||
if (isValidIdentifier(s.toView())
|
||||
/// This are valid identifiers but are problematic if present unquoted in SQL query.
|
||||
&& !(s.size == strlen("distinct") && 0 == strncasecmp(s.data, "distinct", strlen("distinct")))
|
||||
&& !(s.size == strlen("all") && 0 == strncasecmp(s.data, "all", strlen("all"))))
|
||||
&& !(s.size == strlen("all") && 0 == strncasecmp(s.data, "all", strlen("all")))
|
||||
&& !(s.size == strlen("table") && 0 == strncasecmp(s.data, "table", strlen("table"))))
|
||||
{
|
||||
writeString(s, buf);
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
1
|
||||
2
|
||||
(1)
|
@ -0,0 +1,9 @@
|
||||
CREATE TEMPORARY TABLE table (x UInt8);
|
||||
INSERT INTO `table` FORMAT Values (1);
|
||||
INSERT INTO TABLE `table` FORMAT Values (2);
|
||||
SELECT * FROM table ORDER BY x;
|
||||
DROP TABLE table;
|
||||
|
||||
CREATE TEMPORARY TABLE FORMAT (x UInt8);
|
||||
INSERT INTO table FORMAT Values (1);
|
||||
SELECT * FROM FORMAT FORMAT Values;
|
Loading…
Reference in New Issue
Block a user