Skip to content

COPY FROM DATABASE fails on 1.3.1 & 1.4.0.dev861 #338

Open
@jgrg

Description

@jgrg

What happens?

Using the v1.3.1 command line client and 1.4.0.dev861 in Python, and trying to copy an attached database, it produces an error message about empty string being an unknown index type:

▶ COPY FROM DATABASE tqc TO tolqc;
Missing Extension Error:
Cannot bind index 'taxon_request', unknown index type ''. You need to load the extension that provides this index type before table 'taxon_request' can be modified.

The taxon_request table is empty. It's structure is:

                        Table "public.taxon_request"
     Column     |           Type           | Collation | Nullable | Default
----------------+--------------------------+-----------+----------+---------
 species_id     | character varying        |           | not null |
 request_status | character varying        |           |          |
 taxon_id       | integer                  |           |          |
 modified_at    | timestamp with time zone |           |          |
 modified_by    | integer                  |           |          |
Indexes:
    "taxon_request_pkey" PRIMARY KEY, btree (species_id)
    "ix_taxon_request_taxon_id" btree (taxon_id)
Foreign-key constraints:
    "taxon_request_modified_by_fkey" FOREIGN KEY (modified_by) REFERENCES "user"(id)
    "taxon_request_request_status_fkey" FOREIGN KEY (request_status) REFERENCES taxon_request_status_dict(request_status)
Referenced by:
    TABLE "edit_taxon_request" CONSTRAINT "edit_taxon_request_species_id_fkey" FOREIGN KEY (species_id) REFERENCES taxon_request(species_id)

To Reproduce

conn = duckdb.connect("tolqc.duckdb")
conn.execute("""
  ATTACH 'postgresql://[email protected]:5435/tolqc'
  AS tqc (TYPE POSTGRES)
""")
conn.execute("COPY FROM DATABASE tqc TO tolqc")

Let me know if you need more!

OS:

MacOS

PostgreSQL Version:

12.19

DuckDB Version:

1.4.0.dev861 (and v1.3.1)

DuckDB Client:

Python (and CLI)

Full Name:

James Gilbert

Affiliation:

Wellcome Sanger Institute

Have you tried this on the latest main branch?

  • I agree

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

  • I agree

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