X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FPg.pm;fp=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FPg.pm;h=95dd8f49cfb233d72bfe3d31e2eb0f89ead528aa;hb=116431d67fe62da10229791aef6cc0d5a87802d9;hp=38411993cbdf00861d6283c5c406cb16a11fd3fa;hpb=18eb280f9b71785a12c105299f813358faa47143;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm index 3841199..95dd8f4 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm @@ -78,7 +78,7 @@ sub _table_uniq_info { c.relname = ?} ); - $uniq_sth->execute($table->schema, $table); + $uniq_sth->execute($table->schema, $table->name); while(my $row = $uniq_sth->fetchrow_arrayref) { my ($tableid, $indexname, $col_nums) = @$row; $col_nums =~ s/^\s+//; @@ -88,7 +88,7 @@ sub _table_uniq_info { foreach (@col_nums) { $attr_sth->execute($tableid, $_); my $name_aref = $attr_sth->fetchrow_arrayref; - push(@col_names, $name_aref->[0]) if $name_aref; + push(@col_names, $self->_lc($name_aref->[0])) if $name_aref; } if(!@col_names) { @@ -164,7 +164,7 @@ sub _columns_info_for { } my ($precision) = $self->schema->storage->dbh - ->selectrow_array(<selectrow_array(<name, $col); SELECT datetime_precision FROM information_schema.columns WHERE table_name = ? and column_name = ? @@ -199,7 +199,7 @@ EOF elsif ($data_type =~ /^(?:bit(?: varying)?|varbit)\z/i) { $info->{data_type} = 'varbit' if $data_type =~ /var/i; - my ($precision) = $self->dbh->selectrow_array(<dbh->selectrow_array(<name, $col); SELECT character_maximum_length FROM information_schema.columns WHERE table_name = ? and column_name = ?