pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karthikeyan Sundaram <skarthi98@hotmail.com>
To: Anoo Pillai <anoo.postgresql@gmail.com>
To: pgsql-admin@postgresql.org
To: pgsql-general@postgresql.org
Subject: Re: How to get the DML Commands exceuted from functions
Date: Thu, 22 Mar 2007 22:47:13 -0700
Message-ID: <BAY131-W8A0ADCCEA47B2DB628B78B06A0@phx.gbl> (raw)


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.postgresql@gmail.comTo: pgsql-admin@postgresql.org; pgsql-general@postgresql.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=

view thread (2+ messages)

Message-ID: <BAY131-W8A0ADCCEA47B2DB628B78B06A0@phx.gbl>
Permalink:  ../BAY131-W8A0ADCCEA47B2DB628B78B06A0@phx.gbl/
Also on:    postgresql.org/message-id/BAY131-W8A0ADCCEA47B2DB628B78B06A0@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: skarthi98@hotmail.com, anoo.postgresql@gmail.com, pgsql-general@postgresql.org
  Subject: Re: How to get the DML Commands exceuted from functions
  In-Reply-To: <BAY131-W8A0ADCCEA47B2DB628B78B06A0@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox