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

Interface to avoid Prepare in CopyFrom #1387

Closed
cevian opened this issue Nov 21, 2022 · 2 comments
Closed

Interface to avoid Prepare in CopyFrom #1387

cevian opened this issue Nov 21, 2022 · 2 comments

Comments

@cevian
Copy link

cevian commented Nov 21, 2022

Is your feature request related to a problem? Please describe.
Right now CopyFrom requires a Prepare and as far as I could tell this is just used to get type information.

Describe the solution you'd like
I think the default CopyFrom interface should stay as-is but I would like an alternative "Power User" API that allows me to avoid the Prepare on every call to CopyFrom. Using a cache would work as well.

I am happy to submit a PR if I can get some guidance on how you would like me to implement this.

@cevian
Copy link
Author

cevian commented Nov 21, 2022

Oh I missed that this is a duplicate of #1085, closing.

@cevian cevian closed this as completed Nov 21, 2022
@alejandrodnm
Copy link
Contributor

alejandrodnm commented Dec 5, 2022

This will be solved in #1412 by passing either QueryExecModeExec or QueryExecModeSimpleProtocol as the last argument of CopyFrom. Instead of doing the prepare statement it will use the type map between golang and postgresql data types.

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

2 participants