From: Ken Youens-Clark Date: Fri, 7 Mar 2003 16:08:22 +0000 (+0000) Subject: Added code to kill field qualifiers in index field declarations. X-Git-Tag: v0.02~220 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d8dcdb7a05834701200e2fca9a9a46900cdf1888;p=dbsrgits%2FSQL-Translator.git Added code to kill field qualifiers in index field declarations. --- diff --git a/lib/SQL/Translator/Producer/PostgreSQL.pm b/lib/SQL/Translator/Producer/PostgreSQL.pm index 90f0118..f448b71 100644 --- a/lib/SQL/Translator/Producer/PostgreSQL.pm +++ b/lib/SQL/Translator/Producer/PostgreSQL.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::PostgreSQL; # ------------------------------------------------------------------- -# $Id: PostgreSQL.pm,v 1.6 2003-01-27 17:04:48 dlc Exp $ +# $Id: PostgreSQL.pm,v 1.7 2003-03-07 16:08:22 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark , # darren chamberlain , @@ -30,7 +30,7 @@ SQL::Translator::Producer::PostgreSQL - PostgreSQL producer for SQL::Translator use strict; use vars qw[ $DEBUG $WARN $VERSION ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/; $DEBUG = 1 unless defined $DEBUG; use Data::Dumper; @@ -280,8 +280,10 @@ sub produce { for my $index ( @{ $table->{'indices'} } ) { my $index_name = $index->{'name'} || ''; my $index_type = $index->{'type'} || 'normal'; - my @fields = map { unreserve( $_, $table_name ) } - @{ $index->{'fields'} }; + my @fields = + map { $_ =~ s/\(.+\)//; $_ } + map { unreserve( $_, $table_name ) } + @{ $index->{'fields'} }; next unless @fields; if ( $index_type eq 'primary_key' ) {