From: Ansgar Burchardt <ansgar@debian.org>
Date: Sun, 21 Nov 2010 12:37:21 +0100
Origin: vendor
Subject: Create test database in /tmp

Building the package with sbuild may result in the path to the socket used by
PostgreSQL to be too long to fit in the sockaddr_un struct defined in
/usr/include/linux/un.h.  For this reason we move the test cluster to a
directory in /tmp.

See also <http://bugs.debian.org/602891>.
--- libdbd-pg-perl.orig/t/dbdpg_test_setup.pl
+++ libdbd-pg-perl/t/dbdpg_test_setup.pl
@@ -675,8 +675,9 @@
 	}
 
 	if (!$testdir) {
-		my $dir = getcwd();
-		$testdir = "$dir/dbdpg_test_database";
+		# my $dir = getcwd();
+		# $testdir = "$dir/dbdpg_test_database";
+		$testdir = find_tempdir();
 	}
 
 	return $testdsn, $testuser, $helpconnect, $su, $uid, $testdir, $pg_ctl, $initdb, $error, $version;
