I did have the file, the generic query did not work for me. It could be a 7.2 vs 7.1 issue. Here is the the sql from my error.log:
select 1 from apm_package_versions
where package_key = :package_key
and installed_p = 't'
it is from the generic xql file, which I had.
The reason I figured it out at all was that there was a different psql statement:
fullquery name="apm_package_version_installed_p.apm_package_version_installed_p"
that looked very close to "apm_package_installed_p" and existed in the postgres verson of the file. So I made a pg specific version based on what I had seen in the version query.
The error went away so it apears to have worked.