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

pgduckdb_get_querydef() ignores certain type conversion #561

Open
2 tasks done
dpxcc opened this issue Jan 27, 2025 · 0 comments
Open
2 tasks done

pgduckdb_get_querydef() ignores certain type conversion #561

dpxcc opened this issue Jan 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@dpxcc
Copy link
Contributor

dpxcc commented Jan 27, 2025

What happens?

Certain type conversions are ignored by pgduckdb_get_querydef(), resulting in the query not runnable by DuckDB

To Reproduce

SET duckdb.force_execution TO true;
WITH t as (SELECT chr((126983+i)::int) FROM generate_series(0,26) t(i)) SELECT * FROM t; -- warning

throws warning

WARNING:  (PGDuckDB/CreatePlan) Prepared query returned an error: 'Binder Error: No function matches the given name and argument types 'chr(BIGINT)'. You might need to add explicit type casts.
        Candidate functions:
        chr(INTEGER) -> VARCHAR

because pgduckdb_get_querydef() ignores the type conversion in (126983+i)::int

OS:

Linux

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

0.2.0

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

17.2

Hardware:

No response

Full Name:

Cheng Chen

Affiliation:

Mooncake Labs

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?

Not applicable - the reproduction does not require a data set

Did you include all code required to reproduce the issue?

  • Yes, I have

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

  • Yes, I have
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants