duckdb / duckdb/pg_duckdb

unresolved_type issues

Open
#609 1 comment 0 reactions 0 assignees View on GitHub
unresolved_type
Dominant language
C++
Stars
3.2k
Forks
204
PR merge metrics
No merged PRs in 30d

Description

### What happens?

> Once the query gets executed by DuckDB the actual type will be filled in by DuckDB. So, a query result will never contain a column that has duckdb.unresolved_type as its type.
> So, if you get errors involving this type, please report an issue.

I'm trying to get a duckdb geometry into postgres by wrapping it in ST_AsText() to return a string, but I get an error that it is always an unresolved type.

### To Reproduce

Run this query in postgres:

```sql
select duckdb.install_extension('spatial');
select
r['id'],
r['primary_name'],
r['height'],
st_geomfromtext(r['geom_text']) as geom
from duckdb.query('

SELECT
id,
names.primary as primary_name,
height,
st_astext(geometry) as geom_text
FROM ''s3://overturemaps-us-west-2/release/2025-01-22.0/theme=buildings/type=building/*.parquet''
limit 10

') r;
```

You will get the following error:

```
ERROR: function st_geomfromtext(duckdb.unresolved_type) does not exist
LINE 6: st_geomfromtext(r['geom_text']) as geom
```

### OS:

Linux on Docker on aarch64 Mac

### pg_duckdb Version (if built from source use commit hash):

0.3.1

### Postgres Version (if built from source use commit hash):

17

### Hardware:

_No response_

### Full Name:

Travis Webb

### Affiliation:

myself

### What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

### Did you include all relevant data sets for reproducing the issue?

Yes

### Did you include all code required to reproduce the issue?

- [x] Yes, I have

### Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

- [x] Yes, I have

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.