Re: What query currently running within function - Mailing list pgsql-general

From Guillaume Lelarge
Subject Re: What query currently running within function
Date
Msg-id CAECtzeWKGx5+7sbaczUQ2HdNi1T4ocBHLNZh4oW_dTf+jXxayQ@mail.gmail.com
Whole thread Raw
In response to What query currently running within function  (Rebecca Clarke <r.clarke83@gmail.com>)
Responses Re: What query currently running within function  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
List pgsql-general
Hi,

2014-07-22 11:36 GMT+02:00 Rebecca Clarke <r.clarke83@gmail.com>:
Hi all,

Presently I'm executing a function that runs many queries within it.

select * from _myfunction();

Is there a way to see what query it is up to within the function? 

Unfortunately, no. Even with the latest release. pg_stat_activity shows you what the client fires, not what the server does.
 
When I do a select of pg_stat_activity it just shows me the _myfunction() query.

I'm running postgresql 9.1

Thanks in advance.



--

pgsql-general by date:

Previous
From: Rebecca Clarke
Date:
Subject: What query currently running within function
Next
From: Martin Gudmundsson
Date:
Subject: hstore/jsonb support in hibernate/JPA