From: Paul Harrington Date: Wed, 15 Oct 2003 19:56:20 +0000 (+0000) Subject: This module does not actually use any DBD::Pg calls, just DBI. However, the DBI calls... X-Git-Tag: v0.04~59 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6e86705a5768dbcd89f627c2893c495ed7be376e;p=dbsrgits%2FSQL-Translator.git This module does not actually use any DBD::Pg calls, just DBI. However, the DBI calls are delegated to DBD::Pg and the revision on CPAN (1.22) does not have very usable table_info() and column_info catalog methods. Put in a nagging message so that the user does not get too shocked by the poor results if running with <1.31 --- diff --git a/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm b/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm index f4c42ea..78fe413 100644 --- a/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm +++ b/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::DBI::PostgreSQL; # ------------------------------------------------------------------- -# $Id: PostgreSQL.pm,v 1.3 2003-10-15 16:42:35 kycl4rk Exp $ +# $Id: PostgreSQL.pm,v 1.4 2003-10-15 19:56:20 phrrngtn Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Paul Harrington . # @@ -36,12 +36,11 @@ Uses DBD::Pg 1.31 catalog methods to determine schema structure. use strict; use DBI; -use DBD::Pg 1.31; use Data::Dumper; use SQL::Translator::Schema::Constants; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; # ------------------------------------------------------------------- @@ -53,6 +52,8 @@ sub parse { my ($sth, @tables, $columns); my $stuff; + warn "DBD:Pg $DBD::Pg::VERSION is not likely to produce anything useful. Upgrade to 1.31 or better if available." + unless ($DBD::Pg::VERSION ge '1.31'); if ($dbh->{FetchHashKeyName} ne 'NAME_uc') { $dbh->{FetchHashKeyName} = 'NAME_uc';