Neither the DBI documentation nor the ODBC specification allow '%' for
the type, but some DBDs do (or did, DBD::Pg 3.4.0 no longer does)
allow it. For the ones that didn't, the loader subclass used override
->_tables_list to pass undef explicitly.
Instead, use undef in the default implementation, but allow subclasses
to override as needed (none currently do).
Also change the table argument to default to undef, since that's
equivalent according to the spec and all the DBDs I've tested with or
looked at (SQLite, MySQL, Pg, Oracle, FireBird, ODBC, InterBase).
Revision history for Perl extension DBIx::Class::Schema::Loader
- Fix unescaped left braces in regexes in tests
+ - Use undef instead of '%' fore the table and type arguments
+ to $dbh->tables (fixes breakage with DBD::Pg 3.4.0)
0.07041 2014-08-09
- Fix many_to_many bridges going back to the same table
}
sub _dbh_tables {
- my ($self, $schema) = (shift, shift);
-
- my ($table_pattern, $table_type_pattern) = @_ ? @_ : ('%', '%');
+ my $self = shift;
- return $self->dbh->tables(undef, $schema, $table_pattern, $table_type_pattern);
+ return $self->dbh->tables(undef, @_);
}
# default to be overridden in subclasses if necessary
}
}
-sub _tables_list {
- my ($self, $opts) = @_;
-
- return $self->next::method($opts, undef, undef);
-}
-
sub _filter_tables {
my $self = shift;
}
}
-sub _tables_list {
- my ($self, $opts) = @_;
-
- return $self->next::method($opts, undef, undef);
-}
-
=head1 SEE ALSO
L<DBIx::Class::Schema::Loader::DBI::ODBC::Microsoft_SQL_Server>,
return ($self->next::method(@_), 'mysql');
}
-sub _tables_list {
- my ($self, $opts) = @_;
-
- return $self->next::method($opts, undef, undef);
-}
-
sub _table_fk_info {
my ($self, $table) = @_;