Skip to content

Trino has no key views, and the comment says so - #687

Merged
WaylandYang merged 2 commits into
devfrom
fix/trino-has-no-key-views
Sep 13, 2026
Merged

WaylandYang merged 2 commits into
devfrom
fix/trino-has-no-key-views

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

Comment-only change. The note in trino::schema_row said Trino and Snowflake expose PK/FK through information_schema.table_constraints / key_column_usage, and that Databricks' Unity Catalog records no primary keys. All three are wrong, and the first one led to #682, which queried views that don't exist.

  • Trino / Presto: every catalog's information_schema comes from a built-in connector with only columns, tables, views, schemata, table_privileges and the role tables. The constraint views resolve to TABLE_NOT_FOUND.
  • Snowflake: no key_column_usage. Column-level keys come from SHOW PRIMARY KEYS / SHOW IMPORTED KEYS.
  • Databricks: Unity Catalog does record informational PK/FK in table_constraints / key_column_usage / referential_constraints.

The SchemaColumn.is_primary_key doc now also names the engines that read keys: Postgres (#671) and MySQL/MariaDB (#678).

🤖 Generated with Claude Code

WaylandYang and others added 2 commits September 14, 2026 02:13
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
@WaylandYang
WaylandYang merged commit a349eb1 into dev Sep 13, 2026
4 checks passed
@WaylandYang
WaylandYang deleted the fix/trino-has-no-key-views branch September 13, 2026 18:25
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