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

query preparation works for custom types within CockroachDB transaction #2078

Conversation

DXist
Copy link
Contributor

@DXist DXist commented Aug 30, 2022

This change is a consequence of the bug I've created earlier.

I use CockroachDB and issue an INSERT statement within an explicit transaction. The table has several columns with custom enum types. When I run a test it fails with the error from CockroachDB - "unimplemented: multiple active portals not supported".

The error hasn't reproduced while I used a pool and run multiple queries non transactionally.

This pull request replaces several fetch_one/fetch_optional calls with fetch_many. These queries run to fetch custom Postgres type information during query preparation phase.

fetch_many doesn't leave unclosed unnamed portal and fixes my transactional test pass against CockroachDB.

@DXist DXist changed the title query preparation works for custom types withtin CockroachDB transaction query preparation works for custom types within CockroachDB transaction Aug 30, 2022
@abonander
Copy link
Collaborator

#933 (comment)

@abonander abonander closed this Aug 30, 2022
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

Successfully merging this pull request may close these issues.

2 participants