Skip to content
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

feat: support pg_stat_user_tables and key_column_usage #19739

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

hzxa21
Copy link
Collaborator

@hzxa21 hzxa21 commented Dec 10, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Resolves #17753

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can we add some reliable e2e for them like https://github.com/risingwavelabs/risingwave/blob/main/e2e_test/batch/catalog/issue_8791.slt.part, for example:

select * from information_schema.key_column_usage where 1 != 1;

@hzxa21
Copy link
Collaborator Author

hzxa21 commented Dec 10, 2024

Sure. Will do

@hzxa21 hzxa21 force-pushed the patrick/metabase-catalog-fix branch from e330eb2 to 452d006 Compare December 24, 2024 05:47
/// The view `key_column_usage` contains all constraints belonging to tables that the current user owns or has some privilege other than SELECT on.
/// Ref: [`https://www.postgresql.org/docs/current/infoschema-key-column-usage.html`]
/// Limitation:
/// This view assume the constraint schema is the same as the table schema, since `pg_clatalog`.`pg_constraint` only support primrary key.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the comment: primrary should be primary in the limitation note. Also, there's a typo in pg_clatalog which should be pg_catalog.

The corrected comment should read: "...since pg_catalog.pg_constraint only supports primary key."

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@hzxa21 hzxa21 enabled auto-merge December 24, 2024 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(catalog): pg_stat_user_tables is missing for metabase support
2 participants