Prevent tag array from growing insanely in supercat browses
Modifying the passed-in tag array reference apparently resulted
in those changes persisting to the next call, growing the tag
array at a rapid clip. So we needed to clean that up.
Also, applying the DISTINCT transform to the afr.record column, while
a valiant effort, didn't actually work. distinct() is not DISTINCT
ON () for starters; also, because DISTINCT ON needs to have the
ORDER BY clause match its arguments, and we actually want to order
by afr.value, not afr.record.
We could do it in a subquery, then reorder by value in the outer
SELECT, but it's not clear that json_query supports DISTINCT ON
anyway. Some days I wish I could just write SQL.
We could retrieve only the afr.record column - it's not clear that
any callers actually need the naco-normalized value column - but
that seems like a pretty major change at this point.
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19132
dcc99617-32d9-48b4-a31d-
7c20da2025e4