Subject: | Tests skipped with: invalid connection option "client_encoding" |
When building DBD-Pg-3.5.3 against postgresql-8.4.20, tests are skipped because a connection to server fails and the first one is:
$ prove -b t/01connect.t
t/01connect.t .. #
# DBI Version 1.636
# DBD::Pg Version 3.4.1
# Perl Version 5.20.1
# OS linux
# PostgreSQL (compiled) ?
# PostgreSQL (target) ?
# PostgreSQL (reported) ?
# Default port ?
# DBI_DSN ?
# DBI_USER <not set>
# Test schema dbd_pg_testschema
# LANG en_US.UTF-8
# Adjusted: initdb
# Error was: invalid connection option "client_encoding" at t/dbdpg_test_setup.pl line 555.
t/01connect.t .. skipped: Connection to database failed, cannot continue testing
Files=1, Tests=0, 0 wallclock secs ( 0.03 usr 0.02 sys + 0.09 cusr 0.02 csys = 0.16 CPU)
Result: NOTESTS
DBD-Pg-3.4.2 works fine. First affected version is 3.5.0_1. I identified the culprit. It's commit:
commit 581465d505988d26d44c62bf7d2ebc38aa93d2ba
Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Date: Thu Sep 4 17:46:18 2014 +0100
Force client_encoding=utf8 in tests
Some tests were doing SET NAMES 'UTF8' for the non-ASCII bits, while
others were doing nothing and hoping, so just be consistent and use
UTF8 throughout.
Somebody reported the same issue to mailing <http://comments.gmane.org/gmane.comp.db.postgresql.dbdpg/2889> without relevant response.
Is the client_encoding option supported by postgresql-8.4.20? (The server comes from RHEL-6.)