The previous commit used a function that only exists in Pg 10, so it
would require everyone to upgrade PostgreSQL.
After some investigation, Ben Shum and I found a method that works on
Pg 9.4 through Pg 10 by putting the existing function into a
subselect as suggested by PostgreSQL documentation.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Ben Shum <ben@evergreener.net> Signed-off-by: Jason Boyer <jboyer@library.in.gov>