CREATE EXTENSION pg_stat_monitor;
Set pg_stat_monitor.pgsm_extract_comments = 'yes'; 
SELECT pg_stat_monitor_reset();
 pg_stat_monitor_reset 
-----------------------
 
(1 row)

SELECT 1 AS num /* { "application", psql_app, "real_ip", 192.168.1.3) */;
 num 
-----
   1
(1 row)

SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C";
                                  query                                   |                         comments                         
--------------------------------------------------------------------------+----------------------------------------------------------
 SELECT 1 AS num /* { "application", psql_app, "real_ip", 192.168.1.3) */ | /* { "application", psql_app, "real_ip", 192.168.1.3) */
 SELECT pg_stat_monitor_reset()                                           | 
(2 rows)

SELECT pg_stat_monitor_reset();
 pg_stat_monitor_reset 
-----------------------
 
(1 row)

DROP EXTENSION pg_stat_monitor;
