Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Capture info messages when executing ANALYZE

$
0
0
Hello i'm working on a program y qt creator for making maintanance tasks, and when I execute the query ANALYZE VERBOSE it generates a lot of info messages and shows them in the qt console. What I need is to capture those messages and show them in a text box. Any idea of how to make this?

This is what I'm doing:

QSqlQuery query(bd_seleccionada);
query.exec("ANALYZE VERBOSE");

and these are the messages I want to capture:

INFO: analyzing "pg_catalog.pg_type"
INFO: "pg_type": scanned 8 of 8 pages, containing 323 live rows and 2 dead rows; 323 rows in sample, 323 estimated total rows
INFO: analyzing "pg_catalog.pg_attribute"
INFO: "pg_attribute": scanned 40 of 40 pages, containing 2272 live rows and 32 dead rows; 2272 rows in sample, 2272 estimated total rows
INFO: analyzing "pg_catalog.pg_authid"
INFO: "pg_authid": scanned 1 of 1 pages, containing 11 live rows and 0 dead rows; 11 rows in sample, 11 estimated total rows
INFO: analyzing "pg_catalog.pg_proc"
INFO: "pg_proc": scanned 56 of 56 pages, containing 2342 live rows and 0 dead rows; 2342 rows in sample, 2342 estimated total rows
INFO: analyzing "pg_catalog.pg_class"
INFO: "pg_class": scanned 8 of 8 pages, containing 299 live rows and 41 dead rows; 299 rows in sample, 299 estimated total rows
....... a lot of messages

Viewing all articles
Browse latest Browse all 13329

Trending Articles