Use prepared statement from the start for populate on PostgreSQL
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Wed, 20 Apr 2016 16:23:46 +0000 (17:23 +0100)
committerPeter Rabbitson <ribasushi@cpan.org>
Thu, 21 Apr 2016 09:45:46 +0000 (11:45 +0200)
commit22030f6f3e5ace15060ba1233682dfcfdfb318a7
tree98ec216a33f802ed71e925b88dbbad8bb2f2987f
parent7b731f1eca0005daa869c61a96e48434af5635dc
Use prepared statement from the start for populate on PostgreSQL

DBD::Pg since version 3.0.0 by default only starts using server-side
prepared statements the second time ->execute is called on a given
statement handle.

Unless server-side prepared statements have been disabled (by setting
the threshold to zero), make it use them immediately to avoid parsing
the statement twice.
lib/DBIx/Class/Storage/DBI/Pg.pm