Received: from joeconway.com (unknown [63.210.180.150]) by postgresql.org (Postfix) with ESMTP id B511C476B29; Mon, 4 Mar 2002 12:28:27 -0500 (EST) Received: from [206.19.64.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 3.5.6) with ESMTP-TLS id 32924; Mon, 04 Mar 2002 10:28:08 -0800 Message-ID: <3C83AEC3.8040106@joeconway.com> Date: Mon, 04 Mar 2002 09:28:35 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.8) Gecko/20020204 X-Accept-Language: en-us MIME-Version: 1.0 To: Raymond Chui Cc: pgsql-general@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [GENERAL] Which trigger execute which function? References: <3C7CFBEF.58125413@noaa.gov> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200203/45 X-Sequence-Number: 3580 Raymond Chui wrote: > Previous DBA create a lot of triggers and functions without > documentation like: > > CREATE TRIGGER trigger_name [BEFORE | AFTER] event ON table_name > FOR EACH ROW EXECUTE PROCEDURE function_name(); > > Now he is gone. I couldn't find his PL/PGSQL source codes! > > I can do > > SELECT * FROM pg_proc; > SELECT * FROM pg_trigger; > > to list all the name of triggers and functions. But I don't know which > trigger > execute which function. How do I find out that? > > Our USENET new server (NNTP) doesn't have comp.databases.postgresql.* > news groups. Therefore, please cc: a copy to me if you reply. > Thank Q very much in advance! > You could use "pg_dump -s > mydb.dmp" to dump the database schema. Then open mydb.dmp in a text editor. I think this will show you all the details you need. HTH, Joe