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

Problem updating Postgres ENUM from DuckDB

Open
#379 0 comments 1 reaction 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
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
postgresql, python
Domain
databases

Research direction

Start by reproducing the reported UPDATE statements from the issue against PostgreSQL 17.6 and DuckDB 1.4.1 using the provided CREATE TYPE and CREATE TABLE setup, then trace the PostgreSQL extension's enum handling for UPDATE assignments. Done means enum-valued updates work for both DuckDB and PostgreSQL sources without the unnamed-enum error, with regression coverage for the shown cases.

Written by the indexing model from the issue text.

Description

What happens?

I'm on DuckDB 1.4.1 experiencing difficulty updating a Postgres 17.6 ENUM field status:

Not implemented Error Enums in Postgres must be named - unnamed enums are not supported. Use CREATE TYPE to create a named enum.

All of the following give me the above error:

update mypg.mytable set status=ddb.status where ddb.id=mypg.mytable.id;
update mypg.mytable set status=ddb.status::varchar where ddb.id=mypg.mytable.id;
update mypg.mytable set status=ddb.status::text where ddb.id=mypg.mytable.id;
update mypg.mytable set status=ddb.status::mypg.mystatus_enum where ddb.id=mypg.mytable.id;

Both for DuckDB sources and PG sources, e.g.:

update mypg.mytable set status=mypg.mytable2.status where mypg.mytable2.id=mypg.mytable.id;

and as above but with PG sources.

Making a similar update from within Postgres withough DuckDB is not a problem.

I've also tried using an equivalent ENUM declared in DuckDB.

To Reproduce
CREATE TYPE mystatus_enum AS ENUM (
    'IN_STOCK', 'OUT_OF_STOCK', 'NOT_FOUND', 'NOT_A_PRODUCT'
);

CREATE TABLE mytable
(
    id INTEGER primary key,
    status mystatus_enum
);
OS:

Linux

PostgreSQL Version:

17.6

DuckDB Version:

1.4.1

DuckDB Client:

Python

Full Name:

Rui Da Costa

Affiliation:

startup

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.