duckdb / duckdb/duckdb-postgres
COPY FROM DATABASE fails on 1.3.1 & 1.4.0.dev861
- Dominant language
- C++
- Stars
- 372
- Forks
- 105
- Avg merge
- 10h 19m
- Merged PRs (30d)
- 18
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
```python
conn = duckdb.connect("tolqc.duckdb")
conn.execute("""
ATTACH 'postgresql://tolqc-dev@127.0.0.1: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?
- [x] 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?
- [x] I agree
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.