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>
Fri, 17 Jun 2016 13:41:15 +0000 (15:41 +0200)
commit576ea48fa3ff6baaa7d539c36e660a9fc73899e9
tree04ff8713bcc2ffc50e8a4a485fdfa7311e811be6
parent0844bb396f5702db73a8eea947116475b4d89e9a
Fix ordering by 1:M prefetched boolean columns in Pg

( cherry-pick of 7fe322c8d )

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]