COPY FROM DATABASE fails on 1.3.1 & 1.4.0.dev861
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from duckdb/duckdb-postgres
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-postgres#575 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
duckdb/duckdb-postgres#564 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
duckdb/duckdb-postgres#491 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-postgres#487 · 1 comment ·
Maintainers usually reply within 1 day
-
After `COPY DATABASE FROM <pg>`, the types from pg are improperly formatted in `EXPORT` commandsOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-postgres#429 ·
Maintainers usually reply within 1 day
All issues in duckdb/duckdb-postgres
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
? - Needs Triage bot_watch bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
NVIDIA/cudf-spark-jni#5267 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
(S1 - Need confirmation)
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CleverRaven/Cataclysm-DDA#88974 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/onnxruntime#33215 ·
Maintainers usually reply within 2 days