Fix query to collect information from pg_stat_activity that fail on postgres-xl and certainly postgres-xc. Thanks to xiao huan for the report.