diff --git a/program/lib/Roundcube/rcube_db_pgsql.php b/program/lib/Roundcube/rcube_db_pgsql.php index 12ad7f1f8..290c8a3e8 100644 --- a/program/lib/Roundcube/rcube_db_pgsql.php +++ b/program/lib/Roundcube/rcube_db_pgsql.php @@ -56,6 +56,11 @@ class rcube_db_pgsql extends rcube_db { $dbh->query("SET NAMES 'utf8'"); $dbh->query("SET DATESTYLE TO ISO"); + + // if ?schema= is set in dsn, set the search_path + if ($dsn['schema']) { + $dbh->query("SET search_path TO " . $this->quote($dsn['schema'])); + } } /**