unepwcmc/SAPI — pull request #255 by agnessa (2014-03-12 23:02:44+00:00)
Title: Upgrade postgres to 9.3

The incompatibility I found would raise the error " tuple to be updated or deleted has already been updated or deleted by a BEFORE trigger", which in fact had nothing to do with a trigger but with the recursive function for calculating ancestor listings which had a flaw and would attempt to update same rows multiple times (which previously would be silently ignored). I rewrote this function for CITES, EU and CMS.

The gold master test is made difficult by sorting issues:
1. for CITES and EU the issues seem to boil down to taxa with "-" or """ in their name, which seem to get sorted differently on my machine and production
2. for CMS the 'date' and 'note' columns, which may contain multiple listing changes separated by newlines, don't seem to be sorted at all, so end up random

I haven't found differences in current listing in the new outputs though.

In other news, I did find a duplicate row for Ursus arctos in both the production and new versions of the CITES output, which is likely caused by incorrect cascading of family listing. But I figured - as long as it is consistently incorrect, no kitten will die.