Fix ordering by 1:M prefetched boolean columns in Pg
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Wed, 10 Dec 2014 18:04:06 +0000 (18:04 +0000)
committerPeter Rabbitson <ribasushi@cpan.org>
Thu, 21 Apr 2016 13:53:57 +0000 (15:53 +0200)
commit7fe322c8d2a911e986b0fc2a753b023d63940bcb
tree3bc2b8f01a469ed45e448c8c200985b45652f0d0
parent22030f6f3e5ace15060ba1233682dfcfdfb318a7
Fix ordering by 1:M prefetched boolean columns in Pg

PostgreSQL doesn't have min/max aggregates for the boolean type, but
it has and/or, which are equivalent. So, allow the storage to override
the aggregate used for constructing the order by clause based on the
column info.
Changes
lib/DBIx/Class/Storage/DBI/Pg.pm
lib/DBIx/Class/Storage/DBIHacks.pm
t/sqlmaker/pg.t [new file with mode: 0644]