When you create table with a primary key to Postgres from DuckDB and then DESCRIBE it, not null and primary key constraints are shown. The constraints are also present when you check the table directly in Postgres. Then, after you DETACH, ATTACH, and DESCRIBE again, the constraints are no longer shown.
What happens?
When you create table with a primary key to Postgres from DuckDB and then
DESCRIBE
it, not null and primary key constraints are shown. The constraints are also present when you check the table directly in Postgres. Then, after youDETACH
,ATTACH
, andDESCRIBE
again, the constraints are no longer shown.Came across this while trying to upsert to Postgres which I now found is not supported yet https://github.com/duckdb/postgres_scanner/issues/189. Is this also expected behavior?
To Reproduce
docker compose up
the followingdocker-compose.yaml
:Then, run the following Python script:
The output is
OS:
Ubuntu 20.04.6 (GitHub Codespaces default image mcr.microsoft.com/devcontainers/universal:linux)
PostgreSQL Version:
16.2
DuckDB Version:
0.10.0 and 0.10.1.dev1244
DuckDB Client:
Python
Full Name:
Ville Puuska
Affiliation:
Solita
Have you tried this on the latest
main
branch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?