I had installed QGIS from the installer on the QGIS site. Below that installer was a link to an installer on KyngChaos's site (same version... probably different compile). Downloaded that installer and followed through the installation to get rid of the error.
Thanks to markusN for an answer in a comment.
It looks like it is not possible to export to PGDUMP using COPY rather than INSERT at present.
Direct write access https://grasswiki.osgeo.org/wiki/PostGIS#Direct_write_access appears like a promising approach but I have not tried it.
https://grass.osgeo.org/grass76/manuals/v.out.postgis.html has worked for me,...
Solved it. I couldn't fix what seems to be a bug but at least I managed to get the output for azimuth <100°.
In case anyone is interested, this is what I did. I took my DEM raster to ArcGIS, used the tool "mirror" and took this reversed layer to QGIS where I used it as input for the r.horizon tool. This allowed me to get the output for azimuth 0° (which ...