duckdb / duckdb/duckdb-postgres

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

Open
#352 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
372
Forks
105
Avg merge
10h 19m
Merged PRs (30d)
18

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?

- [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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.