I normally retrieve the row_count of a query by doing GET DIAGNOSTICS row_count (normally within a function).
But if I want to run EXPLAIN ANALYZE on a query AND get row_count, I can't see any easy way to do that other than parsing the string output, because then GET DIAGNOSTICS row_count would return the number of rows in the EXPLAIN output.
Is there any built in way to do this other than parsing the string?