Skip to content

feat(influxdb3_system_tables): expose system.tables for all databases#27270

Open
vrongmeal wants to merge 2 commits into
influxdata:mainfrom
vrongmeal:vrongmeal/system-tables-all-dbs
Open

feat(influxdb3_system_tables): expose system.tables for all databases#27270
vrongmeal wants to merge 2 commits into
influxdata:mainfrom
vrongmeal:vrongmeal/system-tables-all-dbs

Conversation

@vrongmeal
Copy link
Copy Markdown

Closes #27205

Make the system.tables system table available for all databases, not just the internal database. When queried from a non-internal database, the results are scoped to only the tables in that database.

  • I've read the contributing section of the project README.
  • Signed CLA (if not already signed).

Make the `system.tables` system table available for all databases, not
just the internal database. When queried from a non-internal database,
the results are scoped to only the tables in that database.
@philjb
Copy link
Copy Markdown
Contributor

philjb commented Mar 9, 2026

Thanks for your submission: @hiltontj is out for a little bit and will get back to you after returning.

Copy link
Copy Markdown
Contributor

@hiltontj hiltontj left a comment

Choose a reason for hiding this comment

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

Hey @vrongmeal thanks for submitting a PR. The implementation looks clean and straight-forward.

At minimum, some tests are required:

  • A test querying system.tables from a non-internal database and verifying results are scoped to that database only
  • A test querying system.tables from _internal and verifying it still returns all databases (the None path)
  • An edge case test for the error path when the database doesn't exist in the catalog (the ok_or_else on line 57-59 of the PR's tables.rs)

I think the place to write those tests would be influxdb3/tests/server/system_tables.rs.


Someone on our team will need to vet this in Enterprise to verify that there are no authz-related issues with the implementation.

Comment thread influxdb3_system_tables/src/tables.rs Outdated
@vrongmeal
Copy link
Copy Markdown
Author

Hey! Thanks for the review. Updated the PR addressing the comments.

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.

Support system.tables queries when scoped to a database

3 participants