Skip to content

Sequence missing from catalog with ATTACH #10263

@manzt

Description

@manzt

What happens?

I'm not sure this is an issue or expected behavior, but I found the following suprising.

Attaching to database with ATTACH for a database with a sequence raises a Catalog Error (for a missing sequence).

To Reproduce

Create DB

duckdb db.duckdb
CREATE SEQUENCE 'id_seq';
CREATE TABLE person (id INT DEFAULT nextval('id_seq'), age INT NOT NULL);
INSERT INTO person (age) VALUES (10);

Attach in a new session

duckdb
ATTACH 'db.duckdb';
# Error: Catalog Error: Sequence with name id_seq does not exist!

Everything works fine connecting to existing db when starting cli:

duckdb db.duckdb

OS:

macOS 14.2

DuckDB Version:

v0.9.2 3c695d7

DuckDB Client:

CLI

Full Name:

Trevor Manz

Affiliation:

Harvard Medical School

Have you tried this on the latest main branch?

I have tested with a main build

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions