Skip to content

feat: add placeholder table/functions for pg_description queries #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025

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