Skip to content

ducklake_table.table_id as PRIMARY KEY?Β #28

@llersch

Description

@llersch

In the definition of table ducklake_schema we have:

CREATE TABLE ducklake_schema (schema_id BIGINT PRIMARY KEY, schema_uuid UUID, begin_snapshot BIGINT, end_snapshot BIGINT, schema_name VARCHAR);

The schema_id column is a primary key, and according to the documentation it is assigned from

  • schema_id is the numeric identifier of the schema. schema_id is incremented from next_catalog_id in the ducklake_snapshot table.

A similar situation occurs in ducklake_table table:

  • table_id is the numeric identifier of the table. table_id is incremented from next_catalog_id in the ducklake_snapshot table.

And the definition is:

CREATE TABLE ducklake_table (table_id BIGINT, table_uuid UUID, begin_snapshot BIGINT, end_snapshot BIGINT, schema_id BIGINT, table_name VARCHAR);

Shouldn't table_id be declared as primary key as well. Why not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions