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

add CopyBoth ExecStatus #35

Merged
merged 1 commit into from Dec 27, 2016
Merged

add CopyBoth ExecStatus #35

merged 1 commit into from Dec 27, 2016

Conversation

dgvncsz0f
Copy link

@dgvncsz0f dgvncsz0f commented Dec 26, 2016

the reason I'm adding this is to handle responses from
START_REPLICATION command. I believe this is the only case
CopyBoth is ever needed.

Let me know if this is ok. i will gladly change anything you find
necessary. thanks!

@lpsmith
Copy link
Owner

lpsmith commented Dec 26, 2016

Hmm, my main concern here is that this would then require a recent version of libpq to compile, because otherwise PGRES_COPY_BOTH won't be defined in the libpq headers, resulting in a compile error.

One possibility might be to hard-code the constant into postgresql-libpq, and/or use some CPP to work around the issue.

@dgvncsz0f
Copy link
Author

fair enough! I'll work on a patch and will let you know!

@dgvncsz0f
Copy link
Author

dgvncsz0f commented Dec 27, 2016

@lpsmith

i was reading the documentation to check when COPY_BOTH first show up. at least on the documentation, it is 9.1.x. this seems to happen before than PGRES_SINGLE_TUPLE, which the lib already depends on. the later only shows up in 9.2.x.

https://www.postgresql.org/docs/9.1/static/libpq-exec.html
https://www.postgresql.org/docs/9.2/static/libpq-exec.html

my guess is that it is safe to include it, as the minimum version is already set to 9.2.x. what you think?

@lpsmith
Copy link
Owner

lpsmith commented Dec 27, 2016

Good call, yeah I thought this was added subsequent to libpq-9.2. So this looks good to me. Thanks!

@lpsmith lpsmith merged commit cde2171 into lpsmith:master Dec 27, 2016
@lpsmith
Copy link
Owner

lpsmith commented Jan 9, 2017

Uploaded to hackage as postgresql-libpq-0.9.3.0. Take care!

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.

None yet

2 participants