Skip to content

Conversation

sunng87
Copy link
Member

@sunng87 sunng87 commented Jul 15, 2025

This is to address dbeaver query:

SELECT t.oid,t.*,c.relkind,format_type(nullif(t.typbasetype, 0), t.typtypmod) as base_type_name, d.description
    FROM pg_catalog.pg_type t
    LEFT OUTER JOIN pg_catalog.pg_type et ON et.oid=t.typelem
    LEFT OUTER JOIN pg_catalog.pg_class c ON c.oid=t.typrelid
    LEFT OUTER JOIN pg_catalog.pg_description d ON t.oid=d.objoid
    WHERE t.typname IS NOT NULL
    AND (c.relkind IS NULL OR c.relkind = 'c') AND (et.typcategory IS NULL OR et.typcategory <> 'C')

But we are still blocked by this t.oid, t.*, which will be rejected by datafusion, say:

Projections require unique expression names but the expression "t.oid" at position 0 and "t.oid" at position 1 have the same name. Consider aliasing ("AS") one of them.

@sunng87 sunng87 merged commit 83fb024 into master Jul 16, 2025
6 checks passed
@sunng87 sunng87 deleted the feat/pg_description branch July 16, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant