Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

COPY FROM DATABASE fails on 1.3.1 & 1.4.0.dev861

Open
#338 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
postgresql, python
Domain
cli, database

Research direction

Start by running the provided Python reproduction against PostgreSQL 12.19 with DuckDB 1.3.1 or 1.4.0.dev861, then trace the COPY FROM DATABASE path for the attached PostgreSQL database and its empty taxon_request table. Confirm done when the copy completes without treating the empty index type as an unknown extension in both the Python and CLI clients.

Written by the indexing model from the issue text.

Description

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
Dominant language
C++
Stars
372
Forks
107
Avg merge
13h 55m
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from duckdb/duckdb-postgres

All issues in duckdb/duckdb-postgres

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.