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

Types with all the same type return as string and not as struct

Open
#352 1 comment 0 reactions 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
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, postgresql, python
Domain
database

Research direction

Start by reproducing the PostgreSQL composite-type examples through the Python client, using the provided CREATE TYPE statements and a simple SELECT. Done means composite types whose fields share one type are returned as structured values rather than strings, with regression coverage for both the text and boolean examples.

Written by the indexing model from the issue text.

Description

What happens?

If I do a really complex type in postgres, everything works. However if I have a types like this:

CREATE TYPE common.name_type AS (
            de text, fr text, it text
        )
 CREATE TYPE common.cluster_boolean AS (
            g BOOLEAN, p BOOLEAN, s BOOLEAN, b BOOLEAN, h BOOLEAN
        );

DuckDB will return it as string in the form: (value1,value2,value3), which is almost unusable (especially for the boolean case)

To Reproduce
  • Create a type as above in postgres
  • insert some data
  • do a simple select on it
OS:

Windows

PostgreSQL Version:

17.5

DuckDB Version:

1.3.2

DuckDB Client:

Python

Full Name:

Adrian Ehrsam

Affiliation:

Building Material Suisse

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.