Good morning,
I'm trying to make a Postgre profiler reading
pg_catalog.pg_stat_activity.
But when I read that view... I always find my query.
Example:
ResultSet rs = st.executeQuery("SELECT query_start,current_query FROM
pg_catalog.pg_stat_activity where xact_start is not null");
while(rs.next()) {
String sQuery = rs.getString("current_query");
qStart = rs.getTimestamp("query_start");
if(!qStart.equals(qStart_last)){
display.append(sQuery+'\n');
qStart_last=(Timestamp)qStart.clone();
}
}
Always prints "SELECT query_start,current_query FROM
pg_catalog.pg_stat_activity where xact_start is not null" :)
I'd like to discard my query... any ideas?
Thanks
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general