Subject: | Ordered component _shift_siblings fails with Postgresql |
The single query used in _shift_siblings can fail in Postgresql because UNIQUE constraints are
checked during the single query and the order of moving is not guaranteed. If the UNIQUE(
position, group ) is deferred then it will work, but we are running 8.4.5 which doesn't support
that.
See:
http://www.depesz.com/2009/08/11/waiting-for-8-5-deferrable-uniqueness/
The old approach (where each row was moved in a separate query) works, of course, but it's less
ideal than a single query.
Perhaps the approach can be configurable? I'm simply overriding the Ordered component so it's
not difficult to revert to the old code in my case.
See also list discussion: DBIx::Class::Ordered changes. on Sept 18, 2012.