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

feat(c/driver/postgresql): Inital COPY Writer design #1110

Merged
merged 14 commits into from
Sep 28, 2023
Prev Previous commit
Next Next commit
cursor assignment
  • Loading branch information
WillAyd committed Sep 27, 2023
commit a4a48341594b4c17ff6b3f3212dfc02190c665ea
2 changes: 1 addition & 1 deletion c/driver/postgresql/postgres_copy_reader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class PostgresCopyStreamWriteTester {
// TODO: don't think we should do this here; the reader equivalent does
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT the reader implementation just moves through the message buffer. I mirrored that as well for the writer, but that means that trying to read the buffer after the fact requires knowing how many bytes were traversed and moving back there. Probably a better way to do this

// increment the data pointer and seemingly discard at the end, but
// we may still want to keep that buffer available?
buffer->data -= buffer->data - cursor;
buffer->data = cursor;
return result;
}

Expand Down