[Bast-commits] r7832 -
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sat Oct 31 22:59:20 GMT 2009
Author: caelum
Date: 2009-10-31 22:59:19 +0000 (Sat, 31 Oct 2009)
New Revision: 7832
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Pg.pm
Log:
work-around disconnect bug with DBD::Pg 2.15.1
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Pg.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Pg.pm 2009-10-31 20:22:37 UTC (rev 7831)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Pg.pm 2009-10-31 22:59:19 UTC (rev 7832)
@@ -61,12 +61,16 @@
( $schema, $table ) = ( $1, $2 );
}
+### XXX This is unsafe in DBD::Pg 2.15.1, it can disconnect for some reason
+###
# use DBD::Pg to fetch the column info if it is recent enough to
# work. otherwise, use custom SQL
- my $seq_expr = $DBD::Pg::VERSION >= 2.015001
- ? eval{ $dbh->column_info(undef,$schema,$table,$col)->fetchrow_hashref->{COLUMN_DEF} }
- : $self->_dbh_get_column_default( $dbh, $schema, $table, $col );
+# my $seq_expr = $DBD::Pg::VERSION >= 2.015001
+# ? eval{ $dbh->column_info(undef,$schema,$table,$col)->fetchrow_hashref->{COLUMN_DEF} }
+# : $self->_dbh_get_column_default( $dbh, $schema, $table, $col );
+ my $seq_expr = $self->_dbh_get_column_default( $dbh, $schema, $table, $col );
+
# if no default value is set on the column, or if we can't parse the
# default value as a sequence, throw.
unless ( defined $seq_expr and $seq_expr =~ /^nextval\(+'([^']+)'::(?:text|regclass)\)/i ){
More information about the Bast-commits
mailing list