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

Calls to postgres polymorphic functions fail #162

Open
ashertarno opened this issue Aug 25, 2020 · 0 comments
Open

Calls to postgres polymorphic functions fail #162

ashertarno opened this issue Aug 25, 2020 · 0 comments

Comments

@ashertarno
Copy link

The following call:

ReactiveRXGenericQueryExecutor executor =...
executor.query(dslCtx -> dslCtx.selectFrom(DSL.generateSeries(3, 10)))...

will return error io.vertx.pgclient.PgException: function generate_series(unknown, unknown) is not unique

This happens because while all of the queries are turned into prepared statements by AbstractReactiveQueryExecutor.toPreparedQuery() using ParamType.NAMED, such usage isn't allowed in cases of postgres polymorphic functions like generate_series. The usage for such functions in prepared statements is possible only with explicitly cast parameters, e.g. generate_series($1::int,$2::int), while they work without any issues in regular statements.

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

No branches or pull requests

1 participant