summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-07-19 21:38:21 +0200
committerYorhel <git@yorhel.nl>2009-07-19 21:38:21 +0200
commitb8649adc46bd1964e90387400988b984744b0e3e (patch)
tree09c4c4906483700dcdfa6f8e082cc91d702a6453
parent68c2d44c4480ef0a0b2637a5a8e1e0deace5387b (diff)
Multi::Core: Correctly set the pg_enable_utf8 flag
Before this edit, the options part of the DSN was incorrect, resulting in DBD::Pg ignoring the pg_enable_utf8 flag.
-rw-r--r--lib/Multi/Core.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Multi/Core.pm b/lib/Multi/Core.pm
index 73f698bb..4d505d14 100644
--- a/lib/Multi/Core.pm
+++ b/lib/Multi/Core.pm
@@ -18,7 +18,7 @@ sub run {
# spawn our SQL handling session
my @db = @{$VNDB::O{db_login}};
my(@dsn) = DBI->parse_dsn($db[0]);
- $dsn[2] = ($dsn[2]?',':'').'pg_enable_utf8=>1';
+ $dsn[2] = ($dsn[2]?$dsn[2].',':'').'pg_enable_utf8=>1';
$db[0] = "$dsn[0]:$dsn[1]($dsn[2]):$dsn[4]";
POE::Component::Pg->spawn(alias => 'pg', dsn => $db[0], user => $db[1], password => $db[2]);