X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FPg.pm;h=88df494c4542ac75d39c9ced004d4728c949105b;hp=87a237d664e624d29c1f453745c5237abd583489;hb=22030f6f3e5ace15060ba1233682dfcfdfb318a7;hpb=7b731f1eca0005daa869c61a96e48434af5635dc diff --git a/lib/DBIx/Class/Storage/DBI/Pg.pm b/lib/DBIx/Class/Storage/DBI/Pg.pm index 87a237d..88df494 100644 --- a/lib/DBIx/Class/Storage/DBI/Pg.pm +++ b/lib/DBIx/Class/Storage/DBI/Pg.pm @@ -157,6 +157,19 @@ EOS return $seq_expr; } +sub _dbh_execute_for_fetch { + #my ($self, $source, $sth, $tuple_status, @extra) = @_; + + # This is used for bulk insert, so make sure we use a server-side + # prepared statement from the start, unless it's disabled + local $_[2]->{pg_switch_prepared} = 1 if + modver_gt_or_eq( 'DBD::Pg', '3.0.0' ) + and + $_[2]->FETCH('pg_switch_prepared') > 0 + ; + + shift->next::method(@_); +} sub sqlt_type { return 'PostgreSQL';