From: Greg Sabino Mullane Date: Fri, 17 Apr 2009 14:23:13 +0000 (-0400) Subject: Add bad_fake_version() func back in. X-Git-Tag: 2.9.0~112 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=f23f54470b126b9e167f916c40ce6a731f7bc781;p=check_postgres.git Add bad_fake_version() func back in. --- diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm index 6ff302836..049934013 100644 --- a/t/CP_Testing.pm +++ b/t/CP_Testing.pm @@ -387,6 +387,28 @@ SELECT 'PostgreSQL $version on fakefunction for check_postgres.pl testing'::text } ## end of fake version + +sub bad_fake_version { + + my $self = shift; + my $version = shift || '9.9'; + my $dbh = $self->{dbh} || die; + my $dbuser = $self->{testuser} || die; + + $dbh->do(qq{ +CREATE OR REPLACE FUNCTION public.version() +RETURNS TEXT +LANGUAGE SQL +AS \$\$ +SELECT 'Postgres $version on fakefunction for check_postgres.pl testing'::text; +\$\$ +}); + $dbh->do("ALTER USER $dbuser SET search_path = public, pg_catalog"); + $dbh->commit(); + +} ## end of bad fake version + + sub reset_path { my $self = shift;