Thanks with a bit of moving stuff about I think thats sorted it - in case anyone every needs it:
SELECT query, trim(regexp_replace( regexp_replace( regexp_replace(query,'\/\*.+\*\/','','g'), '--[^\r\n]*', ' ', 'g') , '\s+', ' ', 'g')) as q FROM public.pg_stat_statements WHERE dbid IN (SELECT oid FROM pg_database WHERE datname = current_database()) order by query Thanks again, Mike. On 28/10/2015 22:43, Marc Mamin wrote:
', '\/\*.+\*\/','','g'):
-- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general