Open dpprdan opened 3 months ago
Whoops,
INSTALL postgres; LOAD postgres;
ATTACH 'host=localhost user=postgres password=postgres' AS pg (TYPE postgres);
was missing above, the example should be complete now.
Thanks for reporting! This is currently an expected restriction - we don't support upserts yet.
What happens?
INSERT INTO [...] ON CONFLICT
does not find unique/primary key constraint for a referenced conflict target in an attached Postgres DB. Hence, the Upsert does not occur.To Reproduce
Running
as
cat .\duckdb\test_upsert.sql | duckdb
returnsThis is also relevant for multicolumn and simple unique constraints.
OS:
Windows 11 23H2
PostgreSQL Version:
PostgreSQL 16.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
DuckDB Version:
v0.10.0 20b1486d11
DuckDB Client:
CLI
Full Name:
Daniel Possenriede
Affiliation:
Analyse & Konzepte immo.analytics
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?