Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg_duckdb create.sql query fails due to outdated syntax in pg_duckdb 0.3.0 #308

Open
saurabhojha opened this issue Feb 20, 2025 · 1 comment · May be fixed by #307
Open

pg_duckdb create.sql query fails due to outdated syntax in pg_duckdb 0.3.0 #308

saurabhojha opened this issue Feb 20, 2025 · 1 comment · May be fixed by #307

Comments

@saurabhojha
Copy link

This command in pg_duckdb/benchmark.sh pulls the docker image with the latest version of duck db extension (0.3.0).

sudo docker run -d --name pgduck -p 5432:5432 -e POSTGRES_PASSWORD=duckdb -v ./hits.parquet:/tmp/hits.parquet pgduckdb/pgduckdb:16-main

The create query subsequently fails with the following error:

psql postgres://postgres:duckdb@localhost:5432/postgres -f create.sql
psql:/tmp/create.sql:3: ERROR:  a column definition list is only allowed for functions returning "record"
LINE 3: from read_parquet('/tmp/hits.parquet') as (WatchID BIGINT, J...
                                                   ^
HINT:  If you use DuckDB functions like read_parquet, you need to use the r['colname'] syntax introduced in pg_duckdb 0.3.0. It seems like you might be using the outdated "AS (colname coltype, ...)" syntax
@saurabhojha
Copy link
Author

Created a pr to fix the issue: #307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant