**Use case**

This works:

```
SELECT * FROM hits_100m_obfuscated INTO OUTFILE 'hits.csv' FORMAT CSV
```

But I want this:

```
SELECT * FROM hits_100m_obfuscated INTO OUTFILE 'hits.csv'
```

**Describe the solution you'd like**

Every format can register file extension(s) in format factory.
If format is not specified explicitly, we can detect it automatically by file extension.
It should work for compressed files `hits.csv.gz` as well.

The following extensions should be supported at least:
csv, tsv, parquet, orc, native, json, ndjson, xml, md, avro

**Addition details**

Let's also support omitting the format argument for `file`, `url`, `s3`, `hdfs` table functions. 
// if it is an INSERT query with inline data. We will do it again
    // after we have processed the query. But even this guess is
    // beneficial so that we see proper trailing comments in "echo" and
    // server log.
    adjustQueryEnd(th all_queries_end, global_context->getSettingsRef().max_parser_depth
    return MultiQueryProcessingStage::EXECUTE_QUERY;
}
bool ClientBase::processQueryText(const String & text)
{
    if (exit_strings.end() != exit_strings.find(trim(text, [](char c) { return isWhitespaceASCII(c) || c == ';'; })))
        return false;
    if (!is_multiquery)
    {
        assert(!query_fuzzer_runs
        processTextAsSingleQuery(text
        return true;
    }
    if (query_fuzzer_runs)
    {
        processWithFuzzing(text
        return true;
    }
    return executeMultiQuery(text
}
String ClientBase::prompt() const
{
    return boost::replace_all_copy(prompt_by_server_display_name, "{database}", config().getString("database", "default")
}
void ClientBase::runInteractive()
{