Add `postgres_mode` to DuckDB that makes it simulate Postgres in a better capacity
This mode is a (very long tail) mode that improves compatibility between DuckDB's SQL dialect and Postgres' SQL dialect.
e.g.:
SELECT COUNT(*) FROM tblreturns a column namedcount, instead ofcount_star()
Another issue is related to return types of table functions, as these need to be provided in Postgres, e.g.:
SELECT * FROM read_parquet('file.parquet') AS (t INT);
Just to comment on your example. In case of SELECT * AS part should have all columns named with expected type.
But, for minimum i would expect that columns that are going to be used in query should be specified which is already forced by parser. It would be nice specified columns should match column names in parquet file.
SELECT a, b FROM read_parquet('file.parquet)' AS (a INT, B TEXT)
Also note that this issue is more cosmetic than functional (so expecting to be on low priority).
https://github.com/hydradatabase/pg_quack_internal/issues/67
I think all the things in this issue have now been solved/worked around some other way. We might still need a "postgres_mode" feature in duckdb for other reasons, but let's create separate issues for these things when we find them.