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

MBS-9342: Fix imports with DBD::Pg 3.6.0 #516

Merged
merged 4 commits into from Jun 5, 2017

Conversation

mwiencek
Copy link
Member

DBD::Pg 3.6.0 fixed their UTF8 flag handling with respect to the pg_(get|put)copydata methods, and the effect is that we now have to decode our strings before passing them into those functions.

This change also works with DBD::Pg 3.5.3. The way they changed the UTF8 handling is a bit hard to follow since it deals with Perl internals, but it must have only worked accidentally before, if the behavior we were relying on wasn't intended.

The default setting, -1, should work the same for us, and the
documentation strongly recommends this default.

The difference is it respects the client_encoding, but we don't touch
that, meaning it defaults to the database encoding instead, which is
utf8. If it wasn't, we'd have obvious other problems.
DBD::Pg 3.6.0 fixed their UTF8 flag handling with respect to the
pg_(get|put)copydata methods, and the effect is that we now have to
decode our strings before passing them into those functions.

This change also works with DBD::Pg 3.5.3. The way they changed the UTF8
handling is a bit hard to follow since it deals with Perl internals, but
it must have only worked accidentally before, if the behavior we were
relying on wasn't intended.
ReplicationSetup.sql is already loaded by create_test_db.sh.
@mwiencek mwiencek requested a review from yvanzo May 29, 2017 17:20
@mwiencek mwiencek merged commit 9ea56a2 into metabrainz:master Jun 5, 2017
@mwiencek mwiencek deleted the mbs-9342 branch June 5, 2017 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant