diff options
author | fjoe <fjoe@FreeBSD.org> | 2003-08-11 19:47:38 +0000 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2003-08-11 19:47:38 +0000 |
commit | a499d7f62cac765c3304956af06a1e53ec055df6 (patch) | |
tree | b82a5fc05ea9883f3c453c0b36f30244193670ff /databases/p5-DBD-Pg | |
parent | 925820ad873e6e749378c807e78a386154a710a9 (diff) | |
download | FreeBSD-ports-a499d7f62cac765c3304956af06a1e53ec055df6.zip FreeBSD-ports-a499d7f62cac765c3304956af06a1e53ec055df6.tar.gz |
- Add missing 'DBD::Pg::' qualifier in call of db::pg_server_version [1].
- Temporary fix for pg_server_version comparisons [2].
- Bump port revision.
Both errors are already fixed in CVS but patch for [2] from CVS
has some functional changes and committed fix was implemented
differently in less intrusive manner.
Submitted by: Robin Schilham <co9@xs4all.nl> [1]
Jun Kuriyama <kuriyama@imgsrc.co.jp> [2] (partially)
Diffstat (limited to 'databases/p5-DBD-Pg')
-rw-r--r-- | databases/p5-DBD-Pg/Makefile | 1 | ||||
-rw-r--r-- | databases/p5-DBD-Pg/files/patch-Pg.pm | 60 |
2 files changed, 61 insertions, 0 deletions
diff --git a/databases/p5-DBD-Pg/Makefile b/databases/p5-DBD-Pg/Makefile index 9c43aa1..4731b99 100644 --- a/databases/p5-DBD-Pg/Makefile +++ b/databases/p5-DBD-Pg/Makefile @@ -7,6 +7,7 @@ PORTNAME= DBD-Pg PORTVERSION= 1.22 +PORTREVISION= 1 CATEGORIES= databases perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITE_SUBDIR= DBD diff --git a/databases/p5-DBD-Pg/files/patch-Pg.pm b/databases/p5-DBD-Pg/files/patch-Pg.pm new file mode 100644 index 0000000..0420d22 --- /dev/null +++ b/databases/p5-DBD-Pg/files/patch-Pg.pm @@ -0,0 +1,60 @@ +--- ./Pg.pm.orig Tue Aug 12 02:03:06 2003 ++++ ./Pg.pm Tue Aug 12 02:31:41 2003 +@@ -70,8 +70,8 @@ + sub pg_use_catalog { + my $dbh = shift; + my $version = DBD::Pg::pg_server_version($dbh); +- $version =~ /^(\d+\.\d+)/; +- return $1 < 7.3 ? "" : "pg_catalog."; ++ $version =~ s/^(\d+\.\d+).*/\1/; ++ return $version < 7.3 ? "" : "pg_catalog."; + } + + 1; +@@ -200,6 +200,7 @@ + my $wh = ""; # (); + $wh = join( " AND ", '', @wh ) if (@wh); + my $version = DBD::Pg::pg_server_version($dbh); ++ $version =~ s/^(\d+\.\d+).*/\1/; + my $showschema = $version < 7.3 ? "NULL::text" : "n.nspname"; + my $schemajoin = $version < 7.3 ? "" : "LEFT JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace)"; + my $col_info_sql = qq{ +@@ -258,10 +259,10 @@ + my @wh = (); my @dat = (); # Used to hold data for the attributes. + + my $version = DBD::Pg::pg_server_version($dbh); +- $version =~ /^(\d+)\.(\d)/; ++ $version =~ s/^(\d+\.\d+).*/\1/; + + my @flds = qw/catname u.usename bc.relname/; +- $flds[1] = 'n.nspname' unless ($1.$2 < 73); ++ $flds[1] = 'n.nspname' unless ($version < 7.3); + + for my $idx (0 .. $#attrs) { + next if ($flds[$idx] eq 'catname'); # Skip catalog +@@ -600,6 +601,7 @@ + my $tbl_sql = (); + + my $version = DBD::Pg::pg_server_version($dbh); ++ $version =~ s/^(\d+\.\d+).*/\1/; + my $CATALOG = DBD::Pg::pg_use_catalog($dbh); + + if ( # Rules 19a +@@ -804,6 +806,7 @@ + sub tables { + my($dbh) = @_; + my $version = DBD::Pg::pg_server_version($dbh); ++ $version =~ s/^(\d+\.\d+).*/\1/; + + my $SQL = ($version < 7.3) ? + "SELECT relname AS \"TABLE_NAME\" +@@ -908,7 +911,8 @@ + # by pg_constraint. To maintain compatibility, check + # version number and execute appropriate query. + +- my $version = pg_server_version( $dbh ); ++ my $version = DBD::Pg::pg_server_version( $dbh ); ++ $version =~ s/^(\d+\.\d+).*/\1/; + + my $con_query = $version < 7.3 + ? "SELECT rcsrc FROM pg_relcheck WHERE rcname = '${table}_$col_name'" |