Skip site navigation (1) Skip section navigation (2)

Re: How to get the DML Commands exceuted from functions

From: Karthikeyan Sundaram <skarthi98(at)hotmail(dot)com>
To: Anoo Pillai <anoo(dot)postgresql(at)gmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>,<pgsql-general(at)postgresql(dot)org>
Subject: Re: How to get the DML Commands exceuted from functions
Date: 2007-03-23 05:47:13
Message-ID: BAY131-W8A0ADCCEA47B2DB628B78B06A0@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-general
CREATE OR REPLACE FUNCTION xyz() returns int4 as
$body$
DECLARE
....
BEGIN
      IF (TG_OP = 'DELETE') THEN         n_id = OLD.campaign_id;         EXECUTE 'DELETE FROM cn_mapping WHERE campaign_id = '||quote_literal(n_id);         RETURN 0;      END IF;
END;
$body$
 LANGUAGE 'plpgsql' VOLATILE;
 


Date: Fri, 23 Mar 2007 10:44:49 +0530From: anoo(dot)postgresql(at)gmail(dot)comTo: pgsql-admin(at)postgresql(dot)org; pgsql-general(at)postgresql(dot)orgSubject: [ADMIN] How to get the DML Commands exceuted from functions
Hi All, 
 
There are a few plpgsql functions in our application, When the functions are called, I would like to see the commands executed from the functions ( the selects, inserts, updates and Deletes written in the function body)  
 
I am from SQL server world and there exists a tool SQL Profiler for the same purpose. I am looking for something like that 
 
 
Thanks in advance
 
Anoo.S
_________________________________________________________________
Take a break and play crossword puzzles - FREE!
http://games.msn.com/en/flexicon/default.htm?icid=flexicon_ wlmemailtaglinemarch07

pgsql-admin by date

Next:From: Bjarni RagnarssonDate: 2007-03-23 09:52:20
Subject: Re: Encoding problems
Previous:From: Anoo PillaiDate: 2007-03-23 05:14:49
Subject: How to get the DML Commands exceuted from functions

pgsql-general by date

Next:From: Csaba NagyDate: 2007-03-23 10:42:38
Subject: [Fwd: postgres dev question - MVCC slowdown]
Previous:From: Anoo PillaiDate: 2007-03-23 05:14:49
Subject: How to get the DML Commands exceuted from functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group