On Sun, Jan 16, 2005 at 07:00:42PM -0600, Tony Caduto wrote: > Just wondering if there is a way to monitor the SQL that is executed > inside a PL/pgsql function? > I can see some SQL via the stats view, but it does not show the sql that > is being executed in a function. You can get some logging with the log_statement and debug_* configuration settings, although maybe not as much as you'd like. http://www.postgresql.org/docs/7.4/static/runtime-config.html#RUNTIME-CONFIG-LOGGING-WHAT > The reason I ask is it would make debugging large complex functions much > easier. > I get a lot of requests from former MS SQL server DBAs/developers for > such capablility. People request a trace feature for PL/pgSQL from time to time but I don't think anybody has implemented it yet. I'm sure a patch would be welcome.... -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match