Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return TEXT instead of VARCHAR columns
In DuckDB the canonical name for an unlimited size text column is `VARCHAR`[1], in Postgres this is `TEXT`[2]. In DuckDB `TEXT` is simply an alias for `VARCHAR` type, and there's no way to know what was provided by the user. In Postgres these types are actually distinct, although behave exactly the same for unlimited length. Basically everyone uses `TEXT` instead of `VARCHAR`. Currently we convert the DuckDB type to a Postgres `VARCHAR`. In many cases this doesn't really matter, because pretty much all clients handle VARCHAR and TEXT the same too. There's one place where this leaks through though: DDL coming from a query. For example if you do a CTAS with a DuckDB query the resulting table columns will be of type `character varying` instead of `text`[3]. [1]: https://duckdb.org/docs/sql/data_types/text.html [2]: https://www.postgresql.org/docs/current/datatype-character.html [3]: #556 (comment)
- Loading branch information