-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update "write" function to work with pgx4 and higher #96
Conversation
I gave the patch a try but still ran into the originally reported error message.
After replacing the prepared statement with a regular batched insert, I ran into cratedb-prometheus-adapter/crate.go Lines 210 to 219 in 2f98328
Only after that, I could see data arriving in the target table. The link in that context refers to pgx v3.6.2, and I cannot find that comment in the pgx source code anymore in v5. Sounds like that concern is obsolete as well? |
I got this working now in my test environment, could you take another look at it @hammerhead ? |
Looks good from a functional perspective. When running |
I also looked at the possibility of adding a test case to test this function but it seems |
Hi. Thank you so much for discovering the root cause of GH-88, and for submitting this patch and confirming it works well. I think it will be good to merge it without further ado. Can I ask you to squash your commits, @hlcianfagna? Otherwise, I'll just do it, hoping that you don't have any objections about it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged, thank you. 💯
Remove parameterOIDs and resultFormatCodes. jackc/pgx#571 (comment)
93769a1
to
cc06473
Compare
Summary of the changes / Why this is an improvement
Update to write function to work with pgx4
Closes: #88
Checklist