Skip to content

Support postgres types transparently in queries #6817

@osawyerr

Description

@osawyerr

Is your feature request related to a problem or challenge?

DataFusion doesn't support native postgres types. I just realised that postgres queries that use postgres types, like the ones below, fail when executed against DataFusion. For example, the query below fails because the int8 isn’t recognised.

select sum(col1)::int8 from foo_table;

Describe the solution you'd like

Would be useful if type alisases were automatically supported without the user having to re-write postgres queries - e.g. int8 -> bigint and int4 -> int, etc.

Describe alternatives you've considered

Other databases support type aliases, I don't know how easy it is to implement that in DataFusion - https://duckdb.org/docs/sql/data_types/overview

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions