Is it possible to use EXPLAIN from inside a function? Have seen this post http://archives.postgresql.org/pgsql-general/2011-04/msg00750.php but can't get it to work on even a simple query. Need it to work on a query in a function with a UNION.
Perhaps there's a better way of determining if my function is using the indexes I'd like it to use?
Thanks,
Andy